Changeset 31914
- Timestamp:
- 03/27/2015 10:53:50 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r31893 r31914 1848 1848 api.ThemeControl = api.Control.extend({ 1849 1849 1850 touchDrag: false, 1851 1850 1852 /** 1851 1853 * @since 4.2.0 … … 1854 1856 var control = this; 1855 1857 1858 control.container.on( 'touchmove', '.theme', function() { 1859 control.touchDrag = true; 1860 }); 1861 1856 1862 // Bind details view trigger. 1857 control.container.on( 'click keydown ', '.theme', function( event ) {1863 control.container.on( 'click keydown touchend', '.theme', function( event ) { 1858 1864 if ( api.utils.isKeydownButNotEnterEvent( event ) ) { 1859 1865 return; 1860 1866 } 1861 1867 1862 if ( 'button' === event.target.className ) { 1868 // Bail if the user scrolled on a touch device. 1869 if ( control.touchDrag === true ) { 1870 return control.touchDrag = false; 1871 } 1872 1873 // Prevent the modal from showing when the user clicks the action button. 1874 if ( $( event.target ).is( '.theme-actions .button' ) ) { 1863 1875 return; 1864 1876 }
Note: See TracChangeset
for help on using the changeset viewer.