Changeset 27368
- Timestamp:
- 03/03/2014 02:33:22 AM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/post.js
r27131 r27368 371 371 372 372 jQuery(document).ready( function($) { 373 var stamp, visibility, $submitButtons, updateVisibility, updateText, $content, 373 var stamp, visibility, $submitButtons, updateVisibility, updateText, $content, topx, reset, 374 deltax = 0, 374 375 sticky = '', 375 376 last = 0, … … 1068 1069 // When scrolling with mouse wheel or trackpad inside the Text editor, don't scroll the whole window 1069 1070 $content = $('#content').on( 'onwheel' in $document[0] ? 'wheel.text-editor-scroll' : 'mousewheel.text-editor-scroll', function( event ) { 1070 var delta, origEvent = event.originalEvent; 1071 var delta, top, 1072 origEvent = event.originalEvent; 1071 1073 1072 1074 if ( wp.editor && wp.editor.fullscreen.settings.visible ) { 1075 return; 1076 } 1077 1078 // Don't modify scrolling when the Text editor is not active. 1079 if ( document.activeElement && document.activeElement.id !== 'content' ) { 1073 1080 return; 1074 1081 } … … 1085 1092 1086 1093 $content.scrollTop( $content.scrollTop() + delta ); 1094 1095 top = $content.scrollTop(); 1096 1097 if ( topx === top ) { 1098 deltax += delta; 1099 1100 window.clearTimeout( reset ); 1101 reset = window.setTimeout( function() { 1102 deltax = 0; 1103 }, 1000 ); 1104 } else { 1105 deltax = 0; 1106 } 1107 1108 topx = top; 1109 1110 // Sensitivity: scroll the parent window when over-scrolling by more than 800px 1111 if ( deltax > 1000 || deltax < -1000 ) { 1112 return; 1113 } 1114 1087 1115 event.preventDefault(); 1088 1116 }); -
trunk/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js
r27190 r27368 277 277 278 278 editor.on( 'init', function() { 279 var env = tinymce.Env, 279 var env = tinymce.Env, topx, reset, 280 deltax = 0, 280 281 bodyClass = ['mceContentBody'], // back-compat for themes that use this in editor-style.css... 281 282 doc = editor.getDoc(); … … 319 320 // When scrolling with mouse wheel or trackpad inside the editor, don't scroll the parent window 320 321 editor.dom.bind( doc, 'onwheel' in doc ? 'wheel' : 'mousewheel', function( event ) { 321 var delta, docElement = doc.documentElement; 322 var delta, top, 323 docElement = doc.documentElement; 322 324 323 325 if ( editor.settings.wp_fullscreen ) { 326 return; 327 } 328 // Don't modify scrolling when the editor is not active. 329 if ( typeof doc.hasFocus === 'function' && ! doc.hasFocus() ) { 324 330 return; 325 331 } … … 335 341 } 336 342 337 event.preventDefault();338 339 343 if ( env.webkit ) { 340 344 doc.body.scrollTop += delta; … … 342 346 docElement.scrollTop += delta; 343 347 } 348 349 top = docElement.scrollTop || doc.body.scrollTop; 350 351 if ( topx === top ) { 352 deltax += delta; 353 354 window.clearTimeout( reset ); 355 // Sensitivity: delay before resetting the count of over-scroll pixels 356 reset = window.setTimeout( function() { 357 deltax = 0; 358 }, 1000 ); 359 } else { 360 deltax = 0; 361 } 362 363 topx = top; 364 365 // Sensitivity: scroll the parent window when over-scrolling by more than 1000px 366 if ( deltax > 1000 || deltax < -1000 ) { 367 return; 368 } 369 370 event.preventDefault(); 344 371 }); 345 372 } -
trunk/src/wp-includes/version.php
r27234 r27368 5 5 * @global string $wp_version 6 6 */ 7 $wp_version = '3.9-alpha-27 234-src';7 $wp_version = '3.9-alpha-27368-src'; 8 8 9 9 /** … … 19 19 * @global string $tinymce_version 20 20 */ 21 $tinymce_version = '4016-20140 211';21 $tinymce_version = '4016-20140302'; 22 22 23 23 /**
Note: See TracChangeset
for help on using the changeset viewer.