TinyMCE: wptextpattern: disable for IE 8 and lower
Props azaozz, iseulde. See #31441. Built from https://develop.svn.wordpress.org/trunk@32700 git-svn-id: http://core.svn.wordpress.org/trunk@32670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
356fd0ff81
commit
6926314730
|
@ -39,12 +39,12 @@
|
|||
|
||||
rng = editor.selection.getRng();
|
||||
node = rng.startContainer;
|
||||
text = node.nodeValue;
|
||||
|
||||
if ( node.nodeType !== 3 ) {
|
||||
if ( ! node || node.nodeType !== 3 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
text = node.nodeValue;
|
||||
parent = editor.dom.getParent( node, 'p' );
|
||||
|
||||
if ( ! parent ) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
!function(a,b){a.PluginManager.add("wptextpattern",function(c){function d(a,b){f.push({regExp:a,callback:b})}var e=c.$,f=[],g=!1;d(/^[*-]\s/,function(){this.execCommand("InsertUnorderedList")}),d(/^1[.)]\s/,function(){this.execCommand("InsertOrderedList")}),c.on("selectionchange",function(){g=!1}),c.on("keydown",function(b){g&&b.keyCode===a.util.VK.BACKSPACE&&(c.undoManager.undo(),b.preventDefault())}),c.on("keyup",function(d){var h,i,j,k,l;if(d.keyCode===a.util.VK.SPACEBAR&&(h=c.selection.getRng(),i=h.startContainer,j=i.nodeValue,3===i.nodeType&&(k=c.dom.getParent(i,"p")))){for(;(l=k.firstChild)&&3!==l.nodeType;)k=l;l===i&&a.each(f,function(a){var d=j.replace(a.regExp,"");if(j!==d&&h.startOffset===j.length-d.length)return c.undoManager.add(),c.undoManager.transact(function(){d?e(i).replaceWith(document.createTextNode(d)):e(i.parentNode).empty().append("<br>"),c.selection.setCursorLocation(k),a.callback.apply(c)}),b(function(){g=!0}),!1})}})})}(window.tinymce,window.setTimeout);
|
||||
!function(a,b){a.PluginManager.add("wptextpattern",function(c){function d(a,b){f.push({regExp:a,callback:b})}var e=c.$,f=[],g=!1;d(/^[*-]\s/,function(){this.execCommand("InsertUnorderedList")}),d(/^1[.)]\s/,function(){this.execCommand("InsertOrderedList")}),c.on("selectionchange",function(){g=!1}),c.on("keydown",function(b){g&&b.keyCode===a.util.VK.BACKSPACE&&(c.undoManager.undo(),b.preventDefault())}),c.on("keyup",function(d){var h,i,j,k,l;if(d.keyCode===a.util.VK.SPACEBAR&&(h=c.selection.getRng(),i=h.startContainer,i&&3===i.nodeType&&(j=i.nodeValue,k=c.dom.getParent(i,"p")))){for(;(l=k.firstChild)&&3!==l.nodeType;)k=l;l===i&&a.each(f,function(a){var d=j.replace(a.regExp,"");if(j!==d&&h.startOffset===j.length-d.length)return c.undoManager.add(),c.undoManager.transact(function(){d?e(i).replaceWith(document.createTextNode(d)):e(i.parentNode).empty().append("<br>"),c.selection.setCursorLocation(k),a.callback.apply(c)}),b(function(){g=!0}),!1})}})})}(window.tinymce,window.setTimeout);
|
Binary file not shown.
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.3-alpha-32699';
|
||||
$wp_version = '4.3-alpha-32700';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue