fix spellcheck extension on chrome
This commit is contained in:
parent
ca47093bc8
commit
5bead368ea
3 changed files with 30 additions and 9 deletions
|
|
@ -17,8 +17,9 @@ exports.contextMenuHandler = function(e){
|
|||
var PLACEHOLDER = "\x01\x01";
|
||||
var value = w + " " + PLACEHOLDER;
|
||||
text.value = value;
|
||||
text.setSelectionRange(w.length + 1, w.length + 1);
|
||||
text.setSelectionRange(w.length, w.length + 1);
|
||||
text.setSelectionRange(0, 0);
|
||||
text.setSelectionRange(0, w.length);
|
||||
|
||||
var afterKeydown = false;
|
||||
event.addListener(text, "keydown", function onKeydown() {
|
||||
|
|
|
|||
|
|
@ -40,9 +40,7 @@ var BROKEN_SETDATA = useragent.isChrome < 18;
|
|||
var TextInput = function(parentNode, host) {
|
||||
var text = dom.createElement("textarea");
|
||||
text.className = "ace_text-input";
|
||||
/*/ debug
|
||||
text.style.cssText = "opacity:1;background:rgba(0, 250, 0, 0.3);outline:rgba(0, 250, 0, 0.8) solid 1px;outline-offset:3px;width:5em;z-pindex:500";
|
||||
/**/
|
||||
|
||||
if (useragent.isTouchPad)
|
||||
text.setAttribute("x-palm-disable-auto-cap", true);
|
||||
|
||||
|
|
@ -451,7 +449,6 @@ var TextInput = function(parentNode, host) {
|
|||
tempStyle = text.style.cssText;
|
||||
|
||||
text.style.cssText = "z-index:100000;" + (useragent.isIE ? "opacity:0.1;" : "");
|
||||
//debug*/ text.style.cssText += "background:rgba(250, 0, 0, 0.3); opacity:1;";
|
||||
|
||||
resetSelection(host.selection.isEmpty());
|
||||
host._emit("nativecontextmenu", {target: host, domEvent: e});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue