Ticket #31895: 31895-dev-only.patch
File 31895-dev-only.patch, 4.0 KB (added by , 10 years ago) |
---|
-
src/wp-includes/js/tinymce/tinymce.js
1 // 4.1. 9 (2015-03-10)1 // 4.1.10 (2015-03-xx) 2 2 3 3 /** 4 4 * Compiled inline version. (Library mode) … … 2711 2711 */ 2712 2712 define("tinymce/Env", [], function() { 2713 2713 var nav = navigator, userAgent = nav.userAgent; 2714 var opera, webkit, ie, ie11, gecko, mac, iDevice, android;2714 var opera, webkit, ie, ie11, ie12, gecko, mac, iDevice, android; 2715 2715 2716 2716 opera = window.opera && window.opera.buildNumber; 2717 2717 android = /Android/.test(userAgent); … … 2719 2719 ie = !webkit && !opera && (/MSIE/gi).test(userAgent) && (/Explorer/gi).test(nav.appName); 2720 2720 ie = ie && /MSIE (\w+)\./.exec(userAgent)[1]; 2721 2721 ie11 = userAgent.indexOf('Trident/') != -1 && (userAgent.indexOf('rv:') != -1 || nav.appName.indexOf('Netscape') != -1) ? 11 : false; 2722 ie = ie || ie11; 2722 ie12 = (document.msElementsFromPoint && !ie && !ie11) ? 12 : false; 2723 ie = ie || ie11 || ie12; 2723 2724 gecko = !webkit && !ie11 && /Gecko/.test(userAgent); 2724 2725 mac = userAgent.indexOf('Mac') != -1; 2725 2726 iDevice = /(iPad|iPhone)/.test(userAgent); 2726 2727 2728 if (ie12) { 2729 webkit = false; 2730 } 2731 2727 2732 // Is a iPad/iPhone and not on iOS5 sniff the WebKit version since older iOS WebKit versions 2728 2733 // says it has contentEditable support but there is no visible caret. 2729 2734 var contentEditable = !iDevice || userAgent.match(/AppleWebKit\/(\d*)/)[1] >= 534; … … 2833 2838 * @property documentMode 2834 2839 * @type Number 2835 2840 */ 2836 documentMode: ie ? (document.documentMode || 7) : 102841 documentMode: ie && !ie12 ? (document.documentMode || 7) : 10 2837 2842 }; 2838 2843 }); 2839 2844 … … 16242 16247 16243 16248 // BlockFormat shortcuts keys 16244 16249 for (var i = 1; i <= 6; i++) { 16245 ed.addShortcut(' meta+shift+' + i, '', ['FormatBlock', false, 'h' + i]);16250 ed.addShortcut('access+' + i, '', ['FormatBlock', false, 'h' + i]); 16246 16251 } 16247 16252 16248 ed.addShortcut(' meta+shift+7', '', ['FormatBlock', false, 'p']);16249 ed.addShortcut(' meta+shift+8', '', ['FormatBlock', false, 'div']);16250 ed.addShortcut(' meta+shift+9', '', ['FormatBlock', false, 'address']);16253 ed.addShortcut('access+7', '', ['FormatBlock', false, 'p']); 16254 ed.addShortcut('access+8', '', ['FormatBlock', false, 'div']); 16255 ed.addShortcut('access+9', '', ['FormatBlock', false, 'address']); 16251 16256 } 16252 16257 16253 16258 // Public functions … … 26878 26883 return true; 26879 26884 } 26880 26885 26886 function isSiblingsIgnoreWhiteSpace(node1, node2) { 26887 var node; 26888 26889 for (node = node1.nextSibling; node && node != node2; node = node.nextSibling) { 26890 if (node.nodeType == 3 && $.trim(node.data).length === 0) { 26891 continue; 26892 } 26893 26894 if (node !== node2) { 26895 return false; 26896 } 26897 } 26898 26899 return node === node2; 26900 } 26901 26881 26902 function findCaretNode(node, forward, startNode) { 26882 26903 var walker, current, nonEmptyElements; 26883 26904 … … 26989 27010 return rng; 26990 27011 } 26991 27012 26992 if (t extBlock != targetTextBlock) {27013 if (targetTextBlock && textBlock != targetTextBlock) { 26993 27014 if (!isForward) { 27015 if (!isSiblingsIgnoreWhiteSpace(targetTextBlock, textBlock)) { 27016 return rng; 27017 } 27018 26994 27019 if (targetCaretNode.nodeType == 1) { 26995 27020 if (targetCaretNode.nodeName == "BR") { 26996 27021 rng.setStartBefore(targetCaretNode); … … 27007 27032 rng.setEndBefore(caretNode); 27008 27033 } 27009 27034 } else { 27035 if (!isSiblingsIgnoreWhiteSpace(textBlock, targetTextBlock)) { 27036 return rng; 27037 } 27038 27010 27039 if (caretNode.nodeType == 1) { 27011 27040 if (caretNode.nodeName == "BR") { 27012 27041 rng.setStartBefore(caretNode); … … 31285 31314 * @property minorVersion 31286 31315 * @type String 31287 31316 */ 31288 minorVersion: '1. 9',31317 minorVersion: '1.10', 31289 31318 31290 31319 /** 31291 31320 * Release date of TinyMCE build. … … 31293 31322 * @property releaseDate 31294 31323 * @type String 31295 31324 */ 31296 releaseDate: '2015-03- 10',31325 releaseDate: '2015-03-xx', 31297 31326 31298 31327 /** 31299 31328 * Collection of editor instances.