TinyMCE: add support for IE11.

- Add the latest changes from the 3.x branch upstream.
- Reduce the number of calls to tinyMCEPopup.restoreSelection() in our custom plugins.
- Remove the deprecated execCommand("mceBeginUndoLevel");.
See #25281.
Built from https://develop.svn.wordpress.org/trunk@25748


git-svn-id: http://core.svn.wordpress.org/trunk@25661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2013-10-09 21:05:10 +00:00
parent 34da946343
commit 65cd133a6f
9 changed files with 19 additions and 20 deletions

View File

@ -172,8 +172,9 @@ var tinyMCEPopup = {
restoreSelection : function() {
var t = tinyMCEPopup;
if (!t.isWindow && tinymce.isIE)
if (!t.isWindow && tinymce.isIE) {
t.editor.selection.moveToBookmark(t.editor.windowManager.bookmark);
}
},
/**
@ -280,11 +281,12 @@ var tinyMCEPopup = {
// Internal functions
_restoreSelection : function() {
var e = window.event.srcElement;
_restoreSelection : function(e) {
var el = e && e.target ? e.target : window.event.srcElement;
if (e.nodeName == 'INPUT' && (e.type == 'submit' || e.type == 'button'))
if ( el.nodeName == 'INPUT' && ( el.type == 'submit' || el.type == 'button' ) ) {
tinyMCEPopup.restoreSelection();
}
},
/* _restoreSelection : function() {
@ -325,11 +327,13 @@ var tinyMCEPopup = {
document.body.style.display = '';
// Restore selection in IE when focus is placed on a non textarea or input element of the type text
if (tinymce.isIE) {
if ( tinymce.isIE && ! tinymce.isIE11 ) {
document.attachEvent('onmouseup', tinyMCEPopup._restoreSelection);
// Add base target element for it since it would fail with modal dialogs
t.dom.add(t.dom.select('head')[0], 'base', {target : '_self'});
} else if ( tinymce.isIE11 ) {
document.addEventListener('mouseup', tinyMCEPopup._restoreSelection, false);
}
t.restoreSelection();

View File

@ -1 +1 @@
var tinyMCEPopup={init:function(){var a,b=this;a=b.getWin(),tinymce=a.tinymce,tinyMCE=a.tinyMCE,b.editor=tinymce.EditorManager.activeEditor,b.params=b.editor.windowManager.params,b.features=b.editor.windowManager.features,b.dom=tinymce.dom,b.listeners=[],b.onInit={add:function(a,c){b.listeners.push({func:a,scope:c})}},b.isWindow=!1,b.id=b.features.id,b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return window},getWindowArg:function(a,b){var c=this.params[a];return tinymce.is(c)?c:b},getParam:function(a,b){return this.editor.getParam(a,b)},getLang:function(a,b){return this.editor.getLang(a,b)},execCommand:function(a,b,c,d){return d=d||{},d.skip_focus=1,this.restoreSelection(),this.editor.execCommand(a,b,c,d)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},0)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;!a.isWindow&&tinymce.isIE&&a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)},requireLangPack:function(){var a=this,b=a.getWindowArg("plugin_url")||a.getWindowArg("theme_url");b&&a.editor.settings.language&&a.features.translate_i18n!==!1&&(b+="/langs/"+a.editor.settings.language+"_dlg.js",tinymce.ScriptLoader.isDone(b)||(document.write('<script type="text/javascript" src="'+tinymce._addVer(b)+'"></script>'),tinymce.ScriptLoader.markDone(b)))},pickColor:function(a,b){this.execCommand("mceColorPicker",!0,{color:document.getElementById(b).value,func:function(a){document.getElementById(b).value=a;try{document.getElementById(b).onchange()}catch(c){}}})},openBrowser:function(a,b){tinyMCEPopup.restoreSelection(),this.editor.execCallback("file_browser_callback",a,document.getElementById(a).value,b,window)},confirm:function(a,b,c){this.editor.windowManager.confirm(a,b,c,window)},alert:function(a,b,c){this.editor.windowManager.alert(a,b,c,window)},close:function(){function a(){b.editor.windowManager.close(window),b.editor=null}var b=this;tinymce.isOpera?b.getWin().setTimeout(a,0):a()},_restoreSelection:function(){var a=window.event.srcElement;"INPUT"!=a.nodeName||"submit"!=a.type&&"button"!=a.type||tinyMCEPopup.restoreSelection()},_onDOMLoaded:function(){var a,b,c=tinyMCEPopup,d=document.title;c.domLoaded||(c.domLoaded=1,tinyMCEPopup.init(),c.features.translate_i18n!==!1&&(a=document.body.innerHTML,tinymce.isIE&&(a=a.replace(/ (value|title|alt)=([^"][^\s>]+)/gi,' $1="$2"')),document.dir=c.editor.getParam("directionality",""),(b=c.editor.translate(a))&&b!=a&&(document.body.innerHTML=b),(b=c.editor.translate(d))&&b!=d&&(document.title=d=b)),document.body.style.display="",tinymce.isIE&&(document.attachEvent("onmouseup",tinyMCEPopup._restoreSelection),c.dom.add(c.dom.select("head")[0],"base",{target:"_self"})),c.restoreSelection(),c.isWindow?window.focus():c.editor.windowManager.setTitle(window,d),tinymce.isIE||c.isWindow||tinymce.dom.Event._add(document,"focus",function(){c.editor.windowManager.focus(c.id)}),tinymce.each(c.dom.select("select"),function(a){a.onkeydown=tinyMCEPopup._accessHandler}),tinymce.each(c.listeners,function(a){a.func.call(a.scope,c.editor)}),c.getWindowArg("mce_auto_focus",!0)&&(window.focus(),tinymce.each(document.forms,function(a){tinymce.each(a.elements,function(a){return c.dom.hasClass(a,"mceFocus")&&!a.disabled?(a.focus(),!1):void 0})})),document.onkeyup=tinyMCEPopup._closeWinKeyHandler)},_accessHandler:function(a){return a=a||window.event,13==a.keyCode||32==a.keyCode?(a=a.target||a.srcElement,a.onchange&&a.onchange(),tinymce.dom.Event.cancel(a)):void 0},_closeWinKeyHandler:function(a){a=a||window.event,27==a.keyCode&&tinyMCEPopup.close()},_wait:function(){document.attachEvent?(document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&(document.detachEvent("onreadystatechange",arguments.callee),tinyMCEPopup._onDOMLoaded())}),document.documentElement.doScroll&&window==window.top&&function(){if(!tinyMCEPopup.domLoaded){try{document.documentElement.doScroll("left")}catch(a){return setTimeout(arguments.callee,0),void 0}tinyMCEPopup._onDOMLoaded()}}(),document.attachEvent("onload",tinyMCEPopup._onDOMLoaded)):document.addEventListener&&(window.addEventListener("DOMContentLoaded",tinyMCEPopup._onDOMLoaded,!1),window.addEventListener("load",tinyMCEPopup._onDOMLoaded,!1))}};
var tinyMCEPopup={init:function(){var a,b=this;a=b.getWin(),tinymce=a.tinymce,tinyMCE=a.tinyMCE,b.editor=tinymce.EditorManager.activeEditor,b.params=b.editor.windowManager.params,b.features=b.editor.windowManager.features,b.dom=tinymce.dom,b.listeners=[],b.onInit={add:function(a,c){b.listeners.push({func:a,scope:c})}},b.isWindow=!1,b.id=b.features.id,b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return window},getWindowArg:function(a,b){var c=this.params[a];return tinymce.is(c)?c:b},getParam:function(a,b){return this.editor.getParam(a,b)},getLang:function(a,b){return this.editor.getLang(a,b)},execCommand:function(a,b,c,d){return d=d||{},d.skip_focus=1,this.restoreSelection(),this.editor.execCommand(a,b,c,d)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},0)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;!a.isWindow&&tinymce.isIE&&a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)},requireLangPack:function(){var a=this,b=a.getWindowArg("plugin_url")||a.getWindowArg("theme_url");b&&a.editor.settings.language&&a.features.translate_i18n!==!1&&(b+="/langs/"+a.editor.settings.language+"_dlg.js",tinymce.ScriptLoader.isDone(b)||(document.write('<script type="text/javascript" src="'+tinymce._addVer(b)+'"></script>'),tinymce.ScriptLoader.markDone(b)))},pickColor:function(a,b){this.execCommand("mceColorPicker",!0,{color:document.getElementById(b).value,func:function(a){document.getElementById(b).value=a;try{document.getElementById(b).onchange()}catch(c){}}})},openBrowser:function(a,b){tinyMCEPopup.restoreSelection(),this.editor.execCallback("file_browser_callback",a,document.getElementById(a).value,b,window)},confirm:function(a,b,c){this.editor.windowManager.confirm(a,b,c,window)},alert:function(a,b,c){this.editor.windowManager.alert(a,b,c,window)},close:function(){function a(){b.editor.windowManager.close(window),b.editor=null}var b=this;tinymce.isOpera?b.getWin().setTimeout(a,0):a()},_restoreSelection:function(a){var b=a&&a.target?a.target:window.event.srcElement;"INPUT"!=b.nodeName||"submit"!=b.type&&"button"!=b.type||tinyMCEPopup.restoreSelection()},_onDOMLoaded:function(){var a,b,c=tinyMCEPopup,d=document.title;c.domLoaded||(c.domLoaded=1,tinyMCEPopup.init(),c.features.translate_i18n!==!1&&(a=document.body.innerHTML,tinymce.isIE&&(a=a.replace(/ (value|title|alt)=([^"][^\s>]+)/gi,' $1="$2"')),document.dir=c.editor.getParam("directionality",""),(b=c.editor.translate(a))&&b!=a&&(document.body.innerHTML=b),(b=c.editor.translate(d))&&b!=d&&(document.title=d=b)),document.body.style.display="",tinymce.isIE&&!tinymce.isIE11?(document.attachEvent("onmouseup",tinyMCEPopup._restoreSelection),c.dom.add(c.dom.select("head")[0],"base",{target:"_self"})):tinymce.isIE11&&document.addEventListener("mouseup",tinyMCEPopup._restoreSelection,!1),c.restoreSelection(),c.isWindow?window.focus():c.editor.windowManager.setTitle(window,d),tinymce.isIE||c.isWindow||tinymce.dom.Event._add(document,"focus",function(){c.editor.windowManager.focus(c.id)}),tinymce.each(c.dom.select("select"),function(a){a.onkeydown=tinyMCEPopup._accessHandler}),tinymce.each(c.listeners,function(a){a.func.call(a.scope,c.editor)}),c.getWindowArg("mce_auto_focus",!0)&&(window.focus(),tinymce.each(document.forms,function(a){tinymce.each(a.elements,function(a){return c.dom.hasClass(a,"mceFocus")&&!a.disabled?(a.focus(),!1):void 0})})),document.onkeyup=tinyMCEPopup._closeWinKeyHandler)},_accessHandler:function(a){return a=a||window.event,13==a.keyCode||32==a.keyCode?(a=a.target||a.srcElement,a.onchange&&a.onchange(),tinymce.dom.Event.cancel(a)):void 0},_closeWinKeyHandler:function(a){a=a||window.event,27==a.keyCode&&tinyMCEPopup.close()},_wait:function(){document.attachEvent?(document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&(document.detachEvent("onreadystatechange",arguments.callee),tinyMCEPopup._onDOMLoaded())}),document.documentElement.doScroll&&window==window.top&&function(){if(!tinyMCEPopup.domLoaded){try{document.documentElement.doScroll("left")}catch(a){return setTimeout(arguments.callee,0),void 0}tinyMCEPopup._onDOMLoaded()}}(),document.attachEvent("onload",tinyMCEPopup._onDOMLoaded)):document.addEventListener&&(window.addEventListener("DOMContentLoaded",tinyMCEPopup._onDOMLoaded,!1),window.addEventListener("load",tinyMCEPopup._onDOMLoaded,!1))}};

View File

@ -497,7 +497,7 @@ wpImage = {
ed.selection.moveToBookmark(b);
}
tinyMCEPopup.execCommand("mceEndUndoLevel");
ed.execCommand("mceEndUndoLevel");
ed.execCommand('mceRepaint');
tinyMCEPopup.close();
},

File diff suppressed because one or more lines are too long

View File

@ -2,4 +2,4 @@
// Uncomment and change this document.domain value if you are loading the script cross subdomains
// document.domain = 'moxiecode.com';
var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document,{ownEvents:true,proxy:tinyMCEPopup._eventProxy});b.dom.bind(window,"ready",b._onDOMLoaded,b);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},10)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false&&b.editor.settings.language_load!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write('<script type="text/javascript" src="'+tinymce._addVer(a)+'"><\/script>');tinymce.ScriptLoader.markDone(a)}}},pickColor:function(b,a){this.execCommand("mceColorPicker",true,{color:document.getElementById(a).value,func:function(e){document.getElementById(a).value=e;try{document.getElementById(a).onchange()}catch(d){}}})},openBrowser:function(a,c,b){tinyMCEPopup.restoreSelection();this.editor.execCallback("file_browser_callback",a,document.getElementById(a).value,c,window)},confirm:function(b,a,c){this.editor.windowManager.confirm(b,a,c,window)},alert:function(b,a,c){this.editor.windowManager.alert(b,a,c,window)},close:function(){var a=this;function b(){a.editor.windowManager.close(window);tinymce=tinyMCE=a.editor=a.params=a.dom=a.dom.doc=null}if(tinymce.isOpera){a.getWin().setTimeout(b,0)}else{b()}},_restoreSelection:function(){var a=window.event.srcElement;if(a.nodeName=="INPUT"&&(a.type=="submit"||a.type=="button")){tinyMCEPopup.restoreSelection()}},_onDOMLoaded:function(){var b=tinyMCEPopup,d=document.title,e,c,a;if(b.features.translate_i18n!==false){c=document.body.innerHTML;if(tinymce.isIE){c=c.replace(/ (value|title|alt)=([^"][^\s>]+)/gi,' $1="$2"')}document.dir=b.editor.getParam("directionality","");if((a=b.editor.translate(c))&&a!=c){document.body.innerHTML=a}if((a=b.editor.translate(d))&&a!=d){document.title=d=a}}if(!b.editor.getParam("browser_preferred_colors",false)||!b.isWindow){b.dom.addClass(document.body,"forceColors")}document.body.style.display="";if(tinymce.isIE){document.attachEvent("onmouseup",tinyMCEPopup._restoreSelection);b.dom.add(b.dom.select("head")[0],"base",{target:"_self"})}b.restoreSelection();b.resizeToInnerSize();if(!b.isWindow){b.editor.windowManager.setTitle(window,d)}else{window.focus()}if(!tinymce.isIE&&!b.isWindow){b.dom.bind(document,"focus",function(){b.editor.windowManager.focus(b.id)})}tinymce.each(b.dom.select("select"),function(f){f.onkeydown=tinyMCEPopup._accessHandler});tinymce.each(b.listeners,function(f){f.func.call(f.scope,b.editor)});if(b.getWindowArg("mce_auto_focus",true)){window.focus();tinymce.each(document.forms,function(g){tinymce.each(g.elements,function(f){if(b.dom.hasClass(f,"mceFocus")&&!f.disabled){f.focus();return false}})})}document.onkeyup=tinyMCEPopup._closeWinKeyHandler},_accessHandler:function(a){a=a||window.event;if(a.keyCode==13||a.keyCode==32){var b=a.target||a.srcElement;if(b.onchange){b.onchange()}return tinymce.dom.Event.cancel(a)}},_closeWinKeyHandler:function(a){a=a||window.event;if(a.keyCode==27){tinyMCEPopup.close()}},_eventProxy:function(a){return function(b){tinyMCEPopup.dom.events.callNativeHandler(a,b)}}};tinyMCEPopup.init();
var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document,{ownEvents:true,proxy:tinyMCEPopup._eventProxy});b.dom.bind(window,"ready",b._onDOMLoaded,b);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},10)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false&&b.editor.settings.language_load!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write('<script type="text/javascript" src="'+tinymce._addVer(a)+'"><\/script>');tinymce.ScriptLoader.markDone(a)}}},pickColor:function(b,a){this.execCommand("mceColorPicker",true,{color:document.getElementById(a).value,func:function(e){document.getElementById(a).value=e;try{document.getElementById(a).onchange()}catch(d){}}})},openBrowser:function(a,c,b){tinyMCEPopup.restoreSelection();this.editor.execCallback("file_browser_callback",a,document.getElementById(a).value,c,window)},confirm:function(b,a,c){this.editor.windowManager.confirm(b,a,c,window)},alert:function(b,a,c){this.editor.windowManager.alert(b,a,c,window)},close:function(){var a=this;function b(){a.editor.windowManager.close(window);tinymce=tinyMCE=a.editor=a.params=a.dom=a.dom.doc=null}if(tinymce.isOpera){a.getWin().setTimeout(b,0)}else{b()}},_restoreSelection:function(a){var a=a.target||window.event.srcElement;if(a.nodeName=="INPUT"&&(a.type=="submit"||a.type=="button")){tinyMCEPopup.restoreSelection()}},_onDOMLoaded:function(){var b=tinyMCEPopup,d=document.title,e,c,a;if(b.features.translate_i18n!==false){c=document.body.innerHTML;if(tinymce.isIE){c=c.replace(/ (value|title|alt)=([^"][^\s>]+)/gi,' $1="$2"')}document.dir=b.editor.getParam("directionality","");if((a=b.editor.translate(c))&&a!=c){document.body.innerHTML=a}if((a=b.editor.translate(d))&&a!=d){document.title=d=a}}if(!b.editor.getParam("browser_preferred_colors",false)||!b.isWindow){b.dom.addClass(document.body,"forceColors")}document.body.style.display="";if(tinymce.isIE&&!tinymce.isIE11){document.attachEvent("onmouseup",tinyMCEPopup._restoreSelection);b.dom.add(b.dom.select("head")[0],"base",{target:"_self"})}else{if(tinymce.isIE11){document.addEventListener("mouseup",tinyMCEPopup._restoreSelection,false)}}b.restoreSelection();b.resizeToInnerSize();if(!b.isWindow){b.editor.windowManager.setTitle(window,d)}else{window.focus()}if(!tinymce.isIE&&!b.isWindow){b.dom.bind(document,"focus",function(){b.editor.windowManager.focus(b.id)})}tinymce.each(b.dom.select("select"),function(f){f.onkeydown=tinyMCEPopup._accessHandler});tinymce.each(b.listeners,function(f){f.func.call(f.scope,b.editor)});if(b.getWindowArg("mce_auto_focus",true)){window.focus();tinymce.each(document.forms,function(g){tinymce.each(g.elements,function(f){if(b.dom.hasClass(f,"mceFocus")&&!f.disabled){f.focus();return false}})})}document.onkeyup=tinyMCEPopup._closeWinKeyHandler},_accessHandler:function(a){a=a||window.event;if(a.keyCode==13||a.keyCode==32){var b=a.target||a.srcElement;if(b.onchange){b.onchange()}return tinymce.dom.Event.cancel(a)}},_closeWinKeyHandler:function(a){a=a||window.event;if(a.keyCode==27){tinyMCEPopup.close()}},_eventProxy:function(a){return function(b){tinyMCEPopup.dom.events.callNativeHandler(a,b)}}};tinyMCEPopup.init();

View File

@ -121,8 +121,6 @@ var wpLink;
} else {
wpLink.setDefaultValues();
}
tinyMCEPopup.storeSelection();
},
close : function() {
@ -226,7 +224,6 @@ var wpLink;
// If the values are empty, unlink and return
if ( ! attrs.href || attrs.href == 'http://' ) {
if ( e ) {
tinyMCEPopup.execCommand("mceBeginUndoLevel");
b = ed.selection.getBookmark();
ed.dom.remove(e, 1);
ed.selection.moveToBookmark(b);
@ -236,8 +233,6 @@ var wpLink;
return;
}
tinyMCEPopup.execCommand("mceBeginUndoLevel");
if (e == null) {
ed.getDoc().execCommand("unlink", false, null);
tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
@ -252,7 +247,7 @@ var wpLink;
// Sometimes WebKit lets a user create a link where
// they shouldn't be able to. In this case, CreateLink
// injects "#mce_temp_url#" into their content. Fix it.
if ( $(e).text() == '#mce_temp_url#' ) {
if ( tinymce.isWebKit && $(e).text() == '#mce_temp_url#' ) {
ed.dom.remove(e);
e = null;
}
@ -260,16 +255,16 @@ var wpLink;
ed.dom.setAttribs(e, attrs);
}
// Don't move caret if selection was image
// Move the caret if selection was not an image.
if ( e && (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') ) {
ed.focus();
ed.selection.select(e);
ed.selection.collapse(0);
tinyMCEPopup.storeSelection();
}
tinyMCEPopup.execCommand("mceEndUndoLevel");
ed.execCommand("mceEndUndoLevel");
wpLink.close();
ed.focus();
},
updateFields : function( e, li, originalEvent ) {

File diff suppressed because one or more lines are too long

View File

@ -18,7 +18,7 @@ $wp_db_version = 25448;
*
* @global string $tinymce_version
*/
$tinymce_version = '358-25336';
$tinymce_version = '358-25747';
/**
* Holds the required PHP version