Ticket #39797: 39797.0.diff
File 39797.0.diff, 937 bytes (added by , 8 years ago) |
---|
-
src/wp-includes/js/customize-preview.js
147 147 148 148 isInternalJumpLink = ( '#' === link.attr( 'href' ).substr( 0, 1 ) ); 149 149 150 // Allow internal jump links to behave normally without preventing default.151 if ( isInternalJumpLink ) {150 // Allow internal jump links and JS links to behave normally without preventing default. 151 if ( isInternalJumpLink || 'javascript:' === link.prop( 'protocol' ) ) { // jshint ignore:line 152 152 return; 153 153 } 154 154 … … 335 335 } 336 336 337 337 // Ignore links with href="#" or href="#id". 338 if ( '#' === $( element ).attr( 'href' ).substr( 0, 1 ) ) {338 if ( '#' === $( element ).attr( 'href' ).substr( 0, 1 ) || 'javascript:' === element.protocol ) { // jshint ignore:line 339 339 return; 340 340 } 341 341