From d0798995533c78cf3b2a2a37a04b522dd0e86cab Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Sun, 11 Jan 2015 20:42:23 +0000 Subject: [PATCH] TinyMCE wpView: when clicking in the editor optimize the caret placement before or after a view. Props avryl, fixes #30938. Built from https://develop.svn.wordpress.org/trunk@31143 git-svn-id: http://core.svn.wordpress.org/trunk@31124 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../js/tinymce/plugins/wpview/plugin.js | 11 ++++++++--- .../js/tinymce/plugins/wpview/plugin.min.js | 2 +- wp-includes/js/tinymce/wp-tinymce.js.gz | Bin 136197 -> 136212 bytes wp-includes/version.php | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/wp-includes/js/tinymce/plugins/wpview/plugin.js b/wp-includes/js/tinymce/plugins/wpview/plugin.js index 36a76675e2..2a9d496df0 100644 --- a/wp-includes/js/tinymce/plugins/wpview/plugin.js +++ b/wp-includes/js/tinymce/plugins/wpview/plugin.js @@ -162,7 +162,7 @@ tinymce.PluginManager.add( 'wpview', function( editor ) { toolbar = editor.$( viewNode ).find( '.toolbar' ), editorToolbar = tinymce.$( editor.editorContainer ).find( '.mce-toolbar-grp' )[0], editorToolbarBottom = ( editorToolbar && editorToolbar.getBoundingClientRect().bottom ) || 0; - + if ( toolbar.length && editor.iframeElement ) { // 48 = 43 for the toolbar + 5 buffer delta = viewNode.getBoundingClientRect().top + editor.iframeElement.getBoundingClientRect().top - editorToolbarBottom - 48; @@ -264,10 +264,14 @@ tinymce.PluginManager.add( 'wpview', function( editor ) { } else if ( y > lastRect.bottom && ( view = getView( last ) ) ) { setViewCursor( false, view ); event.preventDefault(); - } else { + } else if ( x < bodyRect.left || x > bodyRect.right ) { tinymce.each( editor.dom.select( '.wpview-wrap' ), function( view ) { var rect = view.getBoundingClientRect(); + if ( y < rect.top ) { + return false; + } + if ( y >= rect.top && y <= rect.bottom ) { if ( x < bodyRect.left ) { setViewCursor( true, view ); @@ -276,7 +280,8 @@ tinymce.PluginManager.add( 'wpview', function( editor ) { setViewCursor( false, view ); event.preventDefault(); } - return; + + return false; } }); } diff --git a/wp-includes/js/tinymce/plugins/wpview/plugin.min.js b/wp-includes/js/tinymce/plugins/wpview/plugin.min.js index 5b6b2a3bc6..6c6ebb340b 100644 --- a/wp-includes/js/tinymce/plugins/wpview/plugin.min.js +++ b/wp-includes/js/tinymce/plugins/wpview/plugin.min.js @@ -1 +1 @@ -tinymce.PluginManager.add("wpview",function(a){function b(a){return c(a,"wpview-wrap")}function c(a,b){for(;a&&a.parentNode;){if(a.className&&-1!==(" "+a.className+" ").indexOf(" "+b+" "))return a;a=a.parentNode}return!1}function d(c){return(c=b(c))?window.decodeURIComponent(a.dom.getAttrib(c,"data-wpview-text")||""):""}function e(c,d){return c=b(c),c?(a.dom.setAttrib(c,"data-wpview-text",window.encodeURIComponent(d||"")),!0):!1}function f(a){a.stopPropagation()}function g(b,c){var d=b?"before":"after",e=b?0:1;l(),a.selection.setCursorLocation(a.dom.select(".wpview-selection-"+d,c)[0],e),a.nodeChanged()}function h(b,c,d){var e=a.dom,f=e.create("p");v.ie&&v.ie<11||(f.innerHTML='
'),c?b.parentNode.insertBefore(f,b):e.insertAfter(f,b),l(),c&&d===w.ENTER?g(c,b):a.selection.setCursorLocation(f,0),a.nodeChanged()}function i(b){a.undoManager.transact(function(){h(b),a.dom.remove(b)})}function j(b){var c,e=a.dom;if(b){if(b===o)return void k(b);a.getBody().focus(),l(),o=b,e.setAttrib(b,"data-mce-selected",1),k(b),c=e.create("div",{"class":"wpview-clipboard",contenteditable:"true"},d(b)),a.dom.select(".wpview-body",b)[0].appendChild(c),e.bind(c,"beforedeactivate focusin focusout",f),e.bind(o,"beforedeactivate focusin focusout",f),B?a.selection.select(c):a.selection.select(c,!0),a.nodeChanged(),a.fire("wpview-selected",b)}}function k(b){var c=0,d=a.$(b).find(".toolbar"),e=tinymce.$(a.editorContainer).find(".mce-toolbar-grp")[0],f=e&&e.getBoundingClientRect().bottom||0;d.length&&a.iframeElement&&(c=b.getBoundingClientRect().top+a.iframeElement.getBoundingClientRect().top-f-48),0>c?d.removeClass("mce-arrow-down").css({top:-43+-1*c}):c>0&&!d.hasClass("mce-arrow-down")&&d.addClass("mce-arrow-down").css({top:""})}function l(){var b,c=a.dom;o&&(b=a.dom.select(".wpview-clipboard",o)[0],c.unbind(b),c.remove(b),c.unbind(o,"beforedeactivate focusin focusout click mouseup",f),c.setAttrib(o,"data-mce-selected",null)),o=null}function m(a){return a.replace(/]+data-wpview-text=\"([^"]+)"[^>]*>[\s\S]+?wpview-selection-after[^>]+>(?: |\u00a0)*<\/p><\/div>/g,"$1")}function n(a){return 47>=a&&a!==w.SPACEBAR&&a!==w.ENTER&&a!==w.DELETE&&a!==w.BACKSPACE&&(37>a||a>40)||a>=224||a>=144&&150>=a||a>=91&&93>=a||a>=112&&135>=a}var o,p,q,r,s,t,u,v=tinymce.Env,w=tinymce.util.VK,x=tinymce.dom.TreeWalker,y=!1,z=!0,A=function(){return!1},B=/iPad|iPod|iPhone/.test(navigator.userAgent);return"undefined"!=typeof wp&&wp.mce?(a.on("BeforeAddUndo",function(a){a.lastLevel&&m(a.level.content)===m(a.lastLevel.content)&&a.preventDefault()}),a.on("BeforeSetContent",function(b){var c;b.content&&(o&&i(o),c=a.selection.getNode(),(!b.content.match(/^\s*(https?:\/\/[^\s"]+)\s*$/i)||"P"===c.nodeName&&c.parentNode===a.getBody()&&a.dom.isEmpty(c))&&(b.content=wp.mce.views.toViews(b.content)))}),a.on("SetContent",function(){wp.mce.views.render()}),a.on("click",function(c){var d,e=c.clientX,f=c.clientY,h=a.getBody(),i=h.getBoundingClientRect(),j=h.firstChild,k=j.getBoundingClientRect(),l=h.lastChild,m=l.getBoundingClientRect();fm.bottom&&(d=b(l))?(g(!1,d),c.preventDefault()):tinymce.each(a.dom.select(".wpview-wrap"),function(a){var b=a.getBoundingClientRect();return f>=b.top&&f<=b.bottom?void(ei.right&&(g(!1,a),c.preventDefault())):void 0})}),a.on("init",function(){var c=!1,d=a.selection,e=window.MutationObserver||window.WebKitMutationObserver;a.on("BeforeSetContent",function(){var c,e,f=b(d.getNode());f&&(!f.nextSibling||b(f.nextSibling)?(e=a.getDoc().createTextNode(""),a.dom.insertAfter(e,f)):(c=new x(f.nextSibling,f.nextSibling),e=c.next()),d.select(e),d.collapse(!0))}),a.dom.bind(a.getDoc(),"touchmove",function(){c=!0}),a.on("mousedown mouseup click touchend",function(d){var e=b(d.target);if(z=!1,e){if(d.stopImmediatePropagation(),d.preventDefault(),!("touchend"!==d.type&&"mousedown"!==d.type||d.metaKey||d.ctrlKey)){if(a.dom.hasClass(d.target,"edit"))return v.ie&&a.focus(),wp.mce.views.edit(e),!1;if(a.dom.hasClass(d.target,"remove"))return i(e),!1}return"touchend"===d.type&&c?c=!1:j(e),!1}("touchend"===d.type||"mousedown"===d.type)&&l(),"touchend"===d.type&&c&&(c=!1)},!0),e&&new e(function(){a.fire("wp-body-class-change")}).observe(a.getBody(),{attributes:!0,attributeFilter:["class"]})}),a.on("PreProcess",function(b){tinymce.each(a.dom.select("div[data-wpview-text]",b.node),function(a){a.textContent=a.innerText=" "})}),a.on("PostProcess",function(a){a.content&&(a.content=a.content.replace(/
]*?data-wpview-text="([^"]*)"[^>]*>[\s\S]*?<\/div>/g,function(a,b){return b?"

"+window.decodeURIComponent(b)+"

":""}))}),a.on("keydown",function(c){var d,e,f,k,m,p,r,s=c.keyCode,t=a.dom,u=a.selection;if(o){if((c.metaKey||c.ctrlKey)&&s!==w.BACKSPACE&&86!==s||s>=112&&123>=s)return void((c.metaKey||c.ctrlKey)&&88===s&&(y=o));if(e=b(u.getNode()),e!==o)return void l();s===w.LEFT?(g(!0,e),c.preventDefault()):s===w.UP?(e.previousSibling?b(e.previousSibling)?g(!0,e.previousSibling):(l(),u.select(e.previousSibling,!0),u.collapse()):g(!0,e),c.preventDefault()):s===w.RIGHT?(g(!1,e),c.preventDefault()):s===w.DOWN?(e.nextSibling?b(e.nextSibling)?g(!1,e.nextSibling):(l(),u.setCursorLocation(e.nextSibling,0)):g(!1,e),c.preventDefault()):n(s)||(i(o),(s===w.ENTER||s===w.DELETE||s===w.BACKSPACE)&&c.preventDefault())}else{if(c.metaKey||c.ctrlKey||s>=112&&123>=s)return;if(d=u.getNode(),q=d,e=b(d),u.isCollapsed()||(m=u.getRng(),(e=b(m.endContainer))?(p=m.cloneRange(),u.select(e.previousSibling,!0),u.collapse(),r=u.getRng(),p.setEnd(r.endContainer,r.endOffset),u.setRng(p)):(e=b(m.startContainer))&&(p=m.cloneRange(),p.setStart(e.nextSibling,0),u.setRng(p))),!e)return void(c.keyCode===w.BACKSPACE&&(a.dom.isEmpty(d)?(e=b(d.previousSibling))&&(g(!1,e),a.dom.remove(d),c.preventDefault()):(m=u.getRng())&&0===m.startOffset&&0===m.endOffset&&(e=b(d.previousSibling))&&(g(!1,e),c.preventDefault())));if(!(f=t.hasClass(e,"wpview-selection-before"))&&!(k=t.hasClass(e,"wpview-selection-after")))return;if(n(s))return;k&&s===w.UP||f&&s===w.BACKSPACE?(e.previousSibling?b(e.previousSibling)?g(!1,e.previousSibling):t.isEmpty(e.previousSibling)&&s===w.BACKSPACE?t.remove(e.previousSibling):(u.select(e.previousSibling,!0),u.collapse()):g(!0,e),c.preventDefault()):!k||s!==w.DOWN&&s!==w.RIGHT?!f||s!==w.UP&&s!==w.LEFT?f&&s===w.DOWN?(e.nextSibling?b(e.nextSibling)?g(!0,e.nextSibling):u.setCursorLocation(e.nextSibling,0):g(!1,e),c.preventDefault()):k&&s===w.LEFT||f&&s===w.RIGHT?(j(e),c.preventDefault()):k&&s===w.BACKSPACE?(i(e),c.preventDefault()):k?h(e):f&&h(e,!0,s):(e.previousSibling&&(b(e.previousSibling)?g(s===w.UP,e.previousSibling):(u.select(e.previousSibling,!0),u.collapse())),c.preventDefault()):(e.nextSibling&&(b(e.nextSibling)?g(s===w.RIGHT,e.nextSibling):u.setCursorLocation(e.nextSibling,0)),c.preventDefault()),s===w.ENTER&&c.preventDefault()}}),a.on("keyup",function(){y&&(i(y),y=!1)}),a.on("focus",function(){var c;s=!0,a.dom.addClass(a.getBody(),"has-focus"),z&&(c=b(a.getBody().firstChild))&&g(!0,c),z=!1}),a.on("blur",function(){s=!1,a.dom.removeClass(a.getBody(),"has-focus")}),a.on("NodeChange",function(d){var e=a.dom,f=a.dom.select(".wpview-wrap"),h=d.element.className,i=b(d.element),j=q;if(q=!1,clearInterval(p),tinymce.each(f,function(a){a.className&&(a.className=a.className.replace(/ ?\bwpview-(?:selection-before|selection-after|cursor-hide)\b/g,""))}),s&&i)if("wpview-selection-before"!==h&&"wpview-selection-after"!==h||!a.selection.isCollapsed())c(d.element,"wpview-clipboard")||r||(l(),r++,g(!0,i));else{if(r=0,l(),j===i.previousSibling)return void g(!0,i);if(j===i.nextSibling)return void g(!1,i);e.addClass(i,h),p=setInterval(function(){e.hasClass(i,"wpview-cursor-hide")?e.removeClass(i,"wpview-cursor-hide"):e.addClass(i,"wpview-cursor-hide")},500)}}),a.on("BeforeExecCommand",function(){var c,d=a.selection.getNode();d&&((u="wpview-selection-before"===d.className)||"wpview-selection-after"===d.className)&&(c=b(d))&&(h(c,u),t=c)}),a.on("ExecCommand",function(){var b,c;o&&(b=o,l(),j(b)),t&&(c=t[u?"previousSibling":"nextSibling"],c&&"P"===c.nodeName&&a.dom.isEmpty(c)&&(a.dom.remove(c),g(u,t)),t=!1)}),a.on("ResolveName",function(c){a.dom.hasClass(c.target,"wpview-wrap")?(c.name=a.dom.getAttrib(c.target,"data-wpview-type")||"wpview",c.stopPropagation()):b(c.target)&&(c.preventDefault(),c.stopPropagation())}),{getViewText:d,setViewText:e,getView:b}):{getViewText:A,setViewText:A,getView:A}}); \ No newline at end of file +tinymce.PluginManager.add("wpview",function(a){function b(a){return c(a,"wpview-wrap")}function c(a,b){for(;a&&a.parentNode;){if(a.className&&-1!==(" "+a.className+" ").indexOf(" "+b+" "))return a;a=a.parentNode}return!1}function d(c){return(c=b(c))?window.decodeURIComponent(a.dom.getAttrib(c,"data-wpview-text")||""):""}function e(c,d){return c=b(c),c?(a.dom.setAttrib(c,"data-wpview-text",window.encodeURIComponent(d||"")),!0):!1}function f(a){a.stopPropagation()}function g(b,c){var d=b?"before":"after",e=b?0:1;l(),a.selection.setCursorLocation(a.dom.select(".wpview-selection-"+d,c)[0],e),a.nodeChanged()}function h(b,c,d){var e=a.dom,f=e.create("p");v.ie&&v.ie<11||(f.innerHTML='
'),c?b.parentNode.insertBefore(f,b):e.insertAfter(f,b),l(),c&&d===w.ENTER?g(c,b):a.selection.setCursorLocation(f,0),a.nodeChanged()}function i(b){a.undoManager.transact(function(){h(b),a.dom.remove(b)})}function j(b){var c,e=a.dom;if(b){if(b===o)return void k(b);a.getBody().focus(),l(),o=b,e.setAttrib(b,"data-mce-selected",1),k(b),c=e.create("div",{"class":"wpview-clipboard",contenteditable:"true"},d(b)),a.dom.select(".wpview-body",b)[0].appendChild(c),e.bind(c,"beforedeactivate focusin focusout",f),e.bind(o,"beforedeactivate focusin focusout",f),B?a.selection.select(c):a.selection.select(c,!0),a.nodeChanged(),a.fire("wpview-selected",b)}}function k(b){var c=0,d=a.$(b).find(".toolbar"),e=tinymce.$(a.editorContainer).find(".mce-toolbar-grp")[0],f=e&&e.getBoundingClientRect().bottom||0;d.length&&a.iframeElement&&(c=b.getBoundingClientRect().top+a.iframeElement.getBoundingClientRect().top-f-48),0>c?d.removeClass("mce-arrow-down").css({top:-43+-1*c}):c>0&&!d.hasClass("mce-arrow-down")&&d.addClass("mce-arrow-down").css({top:""})}function l(){var b,c=a.dom;o&&(b=a.dom.select(".wpview-clipboard",o)[0],c.unbind(b),c.remove(b),c.unbind(o,"beforedeactivate focusin focusout click mouseup",f),c.setAttrib(o,"data-mce-selected",null)),o=null}function m(a){return a.replace(/]+data-wpview-text=\"([^"]+)"[^>]*>[\s\S]+?wpview-selection-after[^>]+>(?: |\u00a0)*<\/p><\/div>/g,"$1")}function n(a){return 47>=a&&a!==w.SPACEBAR&&a!==w.ENTER&&a!==w.DELETE&&a!==w.BACKSPACE&&(37>a||a>40)||a>=224||a>=144&&150>=a||a>=91&&93>=a||a>=112&&135>=a}var o,p,q,r,s,t,u,v=tinymce.Env,w=tinymce.util.VK,x=tinymce.dom.TreeWalker,y=!1,z=!0,A=function(){return!1},B=/iPad|iPod|iPhone/.test(navigator.userAgent);return"undefined"!=typeof wp&&wp.mce?(a.on("BeforeAddUndo",function(a){a.lastLevel&&m(a.level.content)===m(a.lastLevel.content)&&a.preventDefault()}),a.on("BeforeSetContent",function(b){var c;b.content&&(o&&i(o),c=a.selection.getNode(),(!b.content.match(/^\s*(https?:\/\/[^\s"]+)\s*$/i)||"P"===c.nodeName&&c.parentNode===a.getBody()&&a.dom.isEmpty(c))&&(b.content=wp.mce.views.toViews(b.content)))}),a.on("SetContent",function(){wp.mce.views.render()}),a.on("click",function(c){var d,e=c.clientX,f=c.clientY,h=a.getBody(),i=h.getBoundingClientRect(),j=h.firstChild,k=j.getBoundingClientRect(),l=h.lastChild,m=l.getBoundingClientRect();fm.bottom&&(d=b(l))?(g(!1,d),c.preventDefault()):(ei.right)&&tinymce.each(a.dom.select(".wpview-wrap"),function(a){var b=a.getBoundingClientRect();return f=b.top&&f<=b.bottom?(ei.right&&(g(!1,a),c.preventDefault()),!1):void 0})}),a.on("init",function(){var c=!1,d=a.selection,e=window.MutationObserver||window.WebKitMutationObserver;a.on("BeforeSetContent",function(){var c,e,f=b(d.getNode());f&&(!f.nextSibling||b(f.nextSibling)?(e=a.getDoc().createTextNode(""),a.dom.insertAfter(e,f)):(c=new x(f.nextSibling,f.nextSibling),e=c.next()),d.select(e),d.collapse(!0))}),a.dom.bind(a.getDoc(),"touchmove",function(){c=!0}),a.on("mousedown mouseup click touchend",function(d){var e=b(d.target);if(z=!1,e){if(d.stopImmediatePropagation(),d.preventDefault(),!("touchend"!==d.type&&"mousedown"!==d.type||d.metaKey||d.ctrlKey)){if(a.dom.hasClass(d.target,"edit"))return v.ie&&a.focus(),wp.mce.views.edit(e),!1;if(a.dom.hasClass(d.target,"remove"))return i(e),!1}return"touchend"===d.type&&c?c=!1:j(e),!1}("touchend"===d.type||"mousedown"===d.type)&&l(),"touchend"===d.type&&c&&(c=!1)},!0),e&&new e(function(){a.fire("wp-body-class-change")}).observe(a.getBody(),{attributes:!0,attributeFilter:["class"]})}),a.on("PreProcess",function(b){tinymce.each(a.dom.select("div[data-wpview-text]",b.node),function(a){a.textContent=a.innerText=" "})}),a.on("PostProcess",function(a){a.content&&(a.content=a.content.replace(/
]*?data-wpview-text="([^"]*)"[^>]*>[\s\S]*?<\/div>/g,function(a,b){return b?"

"+window.decodeURIComponent(b)+"

":""}))}),a.on("keydown",function(c){var d,e,f,k,m,p,r,s=c.keyCode,t=a.dom,u=a.selection;if(o){if((c.metaKey||c.ctrlKey)&&s!==w.BACKSPACE&&86!==s||s>=112&&123>=s)return void((c.metaKey||c.ctrlKey)&&88===s&&(y=o));if(e=b(u.getNode()),e!==o)return void l();s===w.LEFT?(g(!0,e),c.preventDefault()):s===w.UP?(e.previousSibling?b(e.previousSibling)?g(!0,e.previousSibling):(l(),u.select(e.previousSibling,!0),u.collapse()):g(!0,e),c.preventDefault()):s===w.RIGHT?(g(!1,e),c.preventDefault()):s===w.DOWN?(e.nextSibling?b(e.nextSibling)?g(!1,e.nextSibling):(l(),u.setCursorLocation(e.nextSibling,0)):g(!1,e),c.preventDefault()):n(s)||(i(o),(s===w.ENTER||s===w.DELETE||s===w.BACKSPACE)&&c.preventDefault())}else{if(c.metaKey||c.ctrlKey||s>=112&&123>=s)return;if(d=u.getNode(),q=d,e=b(d),u.isCollapsed()||(m=u.getRng(),(e=b(m.endContainer))?(p=m.cloneRange(),u.select(e.previousSibling,!0),u.collapse(),r=u.getRng(),p.setEnd(r.endContainer,r.endOffset),u.setRng(p)):(e=b(m.startContainer))&&(p=m.cloneRange(),p.setStart(e.nextSibling,0),u.setRng(p))),!e)return void(c.keyCode===w.BACKSPACE&&(a.dom.isEmpty(d)?(e=b(d.previousSibling))&&(g(!1,e),a.dom.remove(d),c.preventDefault()):(m=u.getRng())&&0===m.startOffset&&0===m.endOffset&&(e=b(d.previousSibling))&&(g(!1,e),c.preventDefault())));if(!(f=t.hasClass(e,"wpview-selection-before"))&&!(k=t.hasClass(e,"wpview-selection-after")))return;if(n(s))return;k&&s===w.UP||f&&s===w.BACKSPACE?(e.previousSibling?b(e.previousSibling)?g(!1,e.previousSibling):t.isEmpty(e.previousSibling)&&s===w.BACKSPACE?t.remove(e.previousSibling):(u.select(e.previousSibling,!0),u.collapse()):g(!0,e),c.preventDefault()):!k||s!==w.DOWN&&s!==w.RIGHT?!f||s!==w.UP&&s!==w.LEFT?f&&s===w.DOWN?(e.nextSibling?b(e.nextSibling)?g(!0,e.nextSibling):u.setCursorLocation(e.nextSibling,0):g(!1,e),c.preventDefault()):k&&s===w.LEFT||f&&s===w.RIGHT?(j(e),c.preventDefault()):k&&s===w.BACKSPACE?(i(e),c.preventDefault()):k?h(e):f&&h(e,!0,s):(e.previousSibling&&(b(e.previousSibling)?g(s===w.UP,e.previousSibling):(u.select(e.previousSibling,!0),u.collapse())),c.preventDefault()):(e.nextSibling&&(b(e.nextSibling)?g(s===w.RIGHT,e.nextSibling):u.setCursorLocation(e.nextSibling,0)),c.preventDefault()),s===w.ENTER&&c.preventDefault()}}),a.on("keyup",function(){y&&(i(y),y=!1)}),a.on("focus",function(){var c;s=!0,a.dom.addClass(a.getBody(),"has-focus"),z&&(c=b(a.getBody().firstChild))&&g(!0,c),z=!1}),a.on("blur",function(){s=!1,a.dom.removeClass(a.getBody(),"has-focus")}),a.on("NodeChange",function(d){var e=a.dom,f=a.dom.select(".wpview-wrap"),h=d.element.className,i=b(d.element),j=q;if(q=!1,clearInterval(p),tinymce.each(f,function(a){a.className&&(a.className=a.className.replace(/ ?\bwpview-(?:selection-before|selection-after|cursor-hide)\b/g,""))}),s&&i)if("wpview-selection-before"!==h&&"wpview-selection-after"!==h||!a.selection.isCollapsed())c(d.element,"wpview-clipboard")||r||(l(),r++,g(!0,i));else{if(r=0,l(),j===i.previousSibling)return void g(!0,i);if(j===i.nextSibling)return void g(!1,i);e.addClass(i,h),p=setInterval(function(){e.hasClass(i,"wpview-cursor-hide")?e.removeClass(i,"wpview-cursor-hide"):e.addClass(i,"wpview-cursor-hide")},500)}}),a.on("BeforeExecCommand",function(){var c,d=a.selection.getNode();d&&((u="wpview-selection-before"===d.className)||"wpview-selection-after"===d.className)&&(c=b(d))&&(h(c,u),t=c)}),a.on("ExecCommand",function(){var b,c;o&&(b=o,l(),j(b)),t&&(c=t[u?"previousSibling":"nextSibling"],c&&"P"===c.nodeName&&a.dom.isEmpty(c)&&(a.dom.remove(c),g(u,t)),t=!1)}),a.on("ResolveName",function(c){a.dom.hasClass(c.target,"wpview-wrap")?(c.name=a.dom.getAttrib(c.target,"data-wpview-type")||"wpview",c.stopPropagation()):b(c.target)&&(c.preventDefault(),c.stopPropagation())}),{getViewText:d,setViewText:e,getView:b}):{getViewText:A,setViewText:A,getView:A}}); \ No newline at end of file diff --git a/wp-includes/js/tinymce/wp-tinymce.js.gz b/wp-includes/js/tinymce/wp-tinymce.js.gz index 0b2e090b3eea70a2a6ca7b6c7559ced2bac024cd..42039ce5000e9d1ee6eaeff9b64de9ae0d9eadb2 100644 GIT binary patch delta 4370 zcmV+t5$*1Us0fs(2!MnEv;r~%e->?JlaPj3O6+)DtBqZXUD++mNfDPwOB5I$RveM< zvd^+lw%t8f&jB7u_Kz)q17MDxo}Qkszdjrz?1@k|b^1}wyc=tx)$nX>reeJ-zO5F{ z_c}fBJk>RMst@qc<0f$EaTBDq{_aBgyNj*--Q9wY?WuaN7jq%|(e~Yo=Q$ZC_k5rhXV%eJ znG}sKIXNp!-`%DgY(0$UAJ_VmqPCzN+o%g}anl?$Cle{Vwy4UR{||w^P7hG({26Da z0H7XRmQF5n>+sD{Rac7F0Mj84My_?Z{t;ELV5G=VIl;I33^3yv1_*oupl$mUBkW!F>;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o@c={2OXh&z9n8GJ$*@ zx5WkMx7`Len$ZtTp?_bnrF3R|B*IJ1(jW!_%1>cA=T$ z9HOe|1ZA?Ij2~TRJ1tzT@V-uPy{RA5ty-TWf5Tce79Nh-PceHr`#*wcX_(q}kHcQrF9uSYqCY!?4fE0HF;NYx z>q)QtkumUoI3g>AH%^8cEe7TyyazN&6?_fR;iIh^w7}hs7&8Ml%2KPV3?=CZ z2pxdIiH9V!zG2p16+*~Ilk#SIWsHo~UTxjMn2$~)_fpqi);mH0=(|EDst z6qg{AtYx%-PZ@g653S0a^tm(^kLUy7=)L6=)H*6x<&BN$*D0pkRgi+rJ+=;G{WPc8 waGWr{rvTY6;6bq0j`L_vu8K%PhthQz8wJmdf@iAW8AJp84?YyHy4gJj0GKFbu>b%7 diff --git a/wp-includes/version.php b/wp-includes/version.php index fcbce0ded3..e08627ac0b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31142'; +$wp_version = '4.2-alpha-31143'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.