diff --git a/src/wp-includes/js/media-views.js b/src/wp-includes/js/media-views.js
index c1407d3..a121dc5 100644
a
|
b
|
|
4641 | 4641 | tagName: 'li', |
4642 | 4642 | className: 'attachment', |
4643 | 4643 | template: media.template('attachment'), |
| 4644 | isTouch: false, |
4644 | 4645 | |
4645 | 4646 | attributes: { |
4646 | 4647 | tabIndex: 0, |
… |
… |
|
4649 | 4650 | |
4650 | 4651 | events: { |
4651 | 4652 | 'click .attachment-preview': 'toggleSelectionHandler', |
| 4653 | 'touchend .attachment-preview': 'setTouch', |
4652 | 4654 | 'change [data-setting]': 'updateSetting', |
4653 | 4655 | 'change [data-setting] input': 'updateSetting', |
4654 | 4656 | 'change [data-setting] select': 'updateSetting', |
… |
… |
|
4763 | 4765 | this.$bar.width( this.model.get('percent') + '%' ); |
4764 | 4766 | } |
4765 | 4767 | }, |
| 4768 | |
| 4769 | setTouch: function() { |
| 4770 | this.isTouch = true; |
| 4771 | }, |
| 4772 | |
4766 | 4773 | /** |
4767 | 4774 | * @param {Object} event |
4768 | 4775 | */ |
… |
… |
|
4773 | 4780 | if ( 'keydown' === event.type && 13 !== event.keyCode && 32 !== event.keyCode ) { |
4774 | 4781 | return; |
4775 | 4782 | } |
| 4783 | |
4776 | 4784 | if ( event.shiftKey ) { |
4777 | 4785 | method = 'between'; |
4778 | 4786 | } else if ( event.ctrlKey || event.metaKey ) { |
4779 | 4787 | method = 'toggle'; |
4780 | 4788 | } |
4781 | 4789 | |
| 4790 | if ( this.isTouch ) { |
| 4791 | this.isTouch = false; |
| 4792 | method = 'add'; |
| 4793 | } |
| 4794 | |
4782 | 4795 | this.toggleSelection({ |
4783 | 4796 | method: method |
4784 | 4797 | }); |
… |
… |
|
4827 | 4840 | selection[ this.selected() ? 'remove' : 'add' ]( model ); |
4828 | 4841 | selection.single( model ); |
4829 | 4842 | return; |
| 4843 | } else if ( 'add' === method ) { |
| 4844 | selection.add( model ); |
| 4845 | selection.single( model ); |
| 4846 | return; |
| 4847 | |
4830 | 4848 | } |
4831 | 4849 | |
4832 | 4850 | // Fixes bug that loses focus when selecting a featured image |