Changeset 31761
- Timestamp:
- 03/12/2015 10:59:41 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/tinymce/plugins/wpemoji/plugin.js
r31750 r31761 1 1 ( function( tinymce, wp ) { 2 2 tinymce.PluginManager.add( 'wpemoji', function( editor, url ) { 3 var typing; 3 var typing 4 isMacWebKit = tinymce.Env.mac && tinymce.Env.webkit; 4 5 5 6 if ( ! wp.emoji.parseEmoji ) { … … 31 32 selection = editor.selection; 32 33 node = selection.getNode(); 33 bookmark = selection.getBookmark(); 34 35 if ( isMacWebKit ) { 36 bookmark = selection.getBookmark(); 37 } 34 38 35 39 wp.emoji.parse( node ); … … 45 49 } ); 46 50 47 selection.moveToBookmark( bookmark ); 51 // In IE all content in the editor is left selected aftrer wp.emoji.parse()... 52 // Collapse the selection to the beginning. 53 if ( tinymce.Env.ie && node && node.nodeName === 'BODY' ) { 54 selection.collapse( true ); 55 } 56 57 if ( isMacWebKit ) { 58 selection.moveToBookmark( bookmark ); 59 } 48 60 } ); 49 61
Note: See TracChangeset
for help on using the changeset viewer.