Commit 228a7210 authored by campaign's avatar campaign

修复在firefox下不能输入文字的问题

parent 2b1116d6
...@@ -362,7 +362,7 @@ Minder.Receiver = kity.createClass('Receiver', { ...@@ -362,7 +362,7 @@ Minder.Receiver = kity.createClass('Receiver', {
setContainerStyle: function() { setContainerStyle: function() {
var textShapeBox = this.getBaseOffset('screen'); var textShapeBox = this.getBaseOffset('screen');
this.container.style.cssText = ';left:' + (browser.ipad ? '-' : '') + this.container.style.cssText = ';left:' + (browser.ipad ? '-' : '') +
textShapeBox.x + 'px;top:' + (textShapeBox.y ) + textShapeBox.x + 'px;top:' + (textShapeBox.y) +
'px;width:' + textShapeBox.width + 'px;height:' + textShapeBox.height + 'px;'; 'px;width:' + textShapeBox.width + 'px;height:' + textShapeBox.height + 'px;';
return this; return this;
...@@ -504,7 +504,14 @@ Minder.Receiver = kity.createClass('Receiver', { ...@@ -504,7 +504,14 @@ Minder.Receiver = kity.createClass('Receiver', {
var node = this.container.firstChild; var node = this.container.firstChild;
range.setStart(node, this.selection.startOffset); range.setStart(node, this.selection.startOffset);
range.setEnd(node, this.selection.endOffset); range.setEnd(node, this.selection.endOffset);
range.select(); if(browser.gecko){
this.container.focus();
setTimeout(function(){
range.select();
});
}else{
range.select();
}
return this; return this;
}, },
updateContainerRangeBySel:function(){ updateContainerRangeBySel:function(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment