roojs-ui.js
authorAlan <alan@roojs.com>
Fri, 24 Dec 2021 06:44:43 +0000 (14:44 +0800)
committerAlan <alan@roojs.com>
Fri, 24 Dec 2021 06:44:43 +0000 (14:44 +0800)
roojs-ui-debug.js
roojs-bootstrap.js
roojs-bootstrap-debug.js
roojs-all.js
roojs-debug.js

roojs-all.js
roojs-bootstrap-debug.js
roojs-bootstrap.js
roojs-debug.js
roojs-ui-debug.js
roojs-ui.js

index bf44aaf..1b14a60 100644 (file)
@@ -1937,7 +1937,7 @@ i++){if(!A.attributes.item(i).value.length){continue;}B.push(A.attributes.item(i
 Roo.htmleditor.KeyEnter=function(A){Roo.apply(this,A);Roo.get(this.core.doc.body).on('keypress',this.keypress,this);};Roo.htmleditor.KeyEnter.prototype={core:false,keypress:function(e){if(e.charCode!=13){return true;}e.preventDefault();var A=this.core.doc;
 var B=A.createDocumentFragment();var C=A.createTextNode('\n');B.appendChild(C);var D=this.core.win.getSelection().getRangeAt(0);var n=D.commonAncestorContainer;while(n&&n.nodeType!=1){n=n.parentNode;}var li=false;if(n&&n.tagName=='UL'){li=A.createElement('LI');
 n.appendChild(li);}if(n&&n.tagName=='LI'){li=A.createElement('LI');if(n.nextSibling){n.parentNode.insertBefore(li,n.firstSibling);}else{n.parentNode.appendChild(li);}}if(li){D=A.createRange();D.setStartAfter(li);D.collapse(true);var E=this.core.win.getSelection();
-E.removeAllRanges();E.addRange(D);return false;}C=A.createElement('br');B.appendChild(C);D.deleteContents();D.insertNode(B);D=D.cloneRange();D.collapse(false);win.getSelection().removeAllRanges();win.getSelection().addRange(D);return false;}};
+E.removeAllRanges();E.addRange(D);return false;}C=A.createElement('br');B.appendChild(C);D.deleteContents();D.insertNode(B);D=D.cloneRange();D.collapse(false);var E=this.core.win.getSelection();E.removeAllRanges();E.addRange(D);return false;}};
 // Roo/htmleditor/Block.js
 Roo.htmleditor.Block=function(A){};Roo.htmleditor.Block.factory=function(A){var id=Roo.get(A).id;if(typeof(Roo.htmleditor.Block.cache[id])!='undefined'){Roo.htmleditor.Block.cache[id].readElement();return Roo.htmleditor.Block.cache[id];}var B=Roo.htmleditor['Block'+A.getAttribute('data-block')];
 if(typeof(B)=='undefined'){Roo.log("OOps missing block : "+'Block'+A.getAttribute('data-block'));return false;}Roo.htmleditor.Block.cache[id]=new B({node:A});return Roo.htmleditor.Block.cache[id];};Roo.htmleditor.Block.cache={};Roo.htmleditor.Block.prototype={node:false,friendly_name:'Image with caption',context:false,updateElement:function(A){Roo.DomHelper.update(A===undefined?this.node:A,this.toObject());
index 39ecd97..ee33bed 100644 (file)
@@ -26788,11 +26788,9 @@ Roo.htmleditor.KeyEnter.prototype = {
         range.insertNode(docFragment);
         range = range.cloneRange();
         range.collapse(false);
-         
-        win.getSelection().removeAllRanges();
-        win.getSelection().addRange(range);
-        
-    
+        var sel = this.core.win.getSelection();
+        sel.removeAllRanges();
+        sel.addRange(range);
         
     
         return false;
index ec33239..9085e1f 100644 (file)
@@ -1161,7 +1161,7 @@ return false;}if(!ps||ps.nodeType!=1){return false;}if(!ps||ps.tagName!='BR'){re
 Roo.htmleditor.KeyEnter=function(A){Roo.apply(this,A);Roo.get(this.core.doc.body).on('keypress',this.keypress,this);};Roo.htmleditor.KeyEnter.prototype={core:false,keypress:function(e){if(e.charCode!=13){return true;}e.preventDefault();var A=this.core.doc;
 var B=A.createDocumentFragment();var C=A.createTextNode('\n');B.appendChild(C);var D=this.core.win.getSelection().getRangeAt(0);var n=D.commonAncestorContainer;while(n&&n.nodeType!=1){n=n.parentNode;}var li=false;if(n&&n.tagName=='UL'){li=A.createElement('LI');
 n.appendChild(li);}if(n&&n.tagName=='LI'){li=A.createElement('LI');if(n.nextSibling){n.parentNode.insertBefore(li,n.firstSibling);}else{n.parentNode.appendChild(li);}}if(li){D=A.createRange();D.setStartAfter(li);D.collapse(true);var E=this.core.win.getSelection();
-E.removeAllRanges();E.addRange(D);return false;}C=A.createElement('br');B.appendChild(C);D.deleteContents();D.insertNode(B);D=D.cloneRange();D.collapse(false);win.getSelection().removeAllRanges();win.getSelection().addRange(D);return false;}};
+E.removeAllRanges();E.addRange(D);return false;}C=A.createElement('br');B.appendChild(C);D.deleteContents();D.insertNode(B);D=D.cloneRange();D.collapse(false);var E=this.core.win.getSelection();E.removeAllRanges();E.addRange(D);return false;}};
 // Roo/htmleditor/Block.js
 Roo.htmleditor.Block=function(A){};Roo.htmleditor.Block.factory=function(A){var id=Roo.get(A).id;if(typeof(Roo.htmleditor.Block.cache[id])!='undefined'){Roo.htmleditor.Block.cache[id].readElement();return Roo.htmleditor.Block.cache[id];}var B=Roo.htmleditor['Block'+A.getAttribute('data-block')];
 if(typeof(B)=='undefined'){Roo.log("OOps missing block : "+'Block'+A.getAttribute('data-block'));return false;}Roo.htmleditor.Block.cache[id]=new B({node:A});return Roo.htmleditor.Block.cache[id];};Roo.htmleditor.Block.cache={};Roo.htmleditor.Block.prototype={node:false,friendly_name:'Image with caption',context:false,updateElement:function(A){Roo.DomHelper.update(A===undefined?this.node:A,this.toObject());
index 2709a8b..379f23e 100644 (file)
@@ -46315,11 +46315,9 @@ Roo.htmleditor.KeyEnter.prototype = {
         range.insertNode(docFragment);
         range = range.cloneRange();
         range.collapse(false);
-         
-        win.getSelection().removeAllRanges();
-        win.getSelection().addRange(range);
-        
-    
+        var sel = this.core.win.getSelection();
+        sel.removeAllRanges();
+        sel.addRange(range);
         
     
         return false;
index f14f080..7fed8d1 100644 (file)
@@ -22027,11 +22027,9 @@ Roo.htmleditor.KeyEnter.prototype = {
         range.insertNode(docFragment);
         range = range.cloneRange();
         range.collapse(false);
-         
-        win.getSelection().removeAllRanges();
-        win.getSelection().addRange(range);
-        
-    
+        var sel = this.core.win.getSelection();
+        sel.removeAllRanges();
+        sel.addRange(range);
         
     
         return false;
index a621e89..245f5f9 100644 (file)
@@ -1001,7 +1001,7 @@ i++){if(!A.attributes.item(i).value.length){continue;}B.push(A.attributes.item(i
 Roo.htmleditor.KeyEnter=function(A){Roo.apply(this,A);Roo.get(this.core.doc.body).on('keypress',this.keypress,this);};Roo.htmleditor.KeyEnter.prototype={core:false,keypress:function(e){if(e.charCode!=13){return true;}e.preventDefault();var A=this.core.doc;
 var B=A.createDocumentFragment();var C=A.createTextNode('\n');B.appendChild(C);var D=this.core.win.getSelection().getRangeAt(0);var n=D.commonAncestorContainer;while(n&&n.nodeType!=1){n=n.parentNode;}var li=false;if(n&&n.tagName=='UL'){li=A.createElement('LI');
 n.appendChild(li);}if(n&&n.tagName=='LI'){li=A.createElement('LI');if(n.nextSibling){n.parentNode.insertBefore(li,n.firstSibling);}else{n.parentNode.appendChild(li);}}if(li){D=A.createRange();D.setStartAfter(li);D.collapse(true);var E=this.core.win.getSelection();
-E.removeAllRanges();E.addRange(D);return false;}C=A.createElement('br');B.appendChild(C);D.deleteContents();D.insertNode(B);D=D.cloneRange();D.collapse(false);win.getSelection().removeAllRanges();win.getSelection().addRange(D);return false;}};
+E.removeAllRanges();E.addRange(D);return false;}C=A.createElement('br');B.appendChild(C);D.deleteContents();D.insertNode(B);D=D.cloneRange();D.collapse(false);var E=this.core.win.getSelection();E.removeAllRanges();E.addRange(D);return false;}};
 // Roo/htmleditor/Block.js
 Roo.htmleditor.Block=function(A){};Roo.htmleditor.Block.factory=function(A){var id=Roo.get(A).id;if(typeof(Roo.htmleditor.Block.cache[id])!='undefined'){Roo.htmleditor.Block.cache[id].readElement();return Roo.htmleditor.Block.cache[id];}var B=Roo.htmleditor['Block'+A.getAttribute('data-block')];
 if(typeof(B)=='undefined'){Roo.log("OOps missing block : "+'Block'+A.getAttribute('data-block'));return false;}Roo.htmleditor.Block.cache[id]=new B({node:A});return Roo.htmleditor.Block.cache[id];};Roo.htmleditor.Block.cache={};Roo.htmleditor.Block.prototype={node:false,friendly_name:'Image with caption',context:false,updateElement:function(A){Roo.DomHelper.update(A===undefined?this.node:A,this.toObject());