fix autocomplete popup click regression
This commit is contained in:
parent
7fbfbc4c16
commit
f9b3655c94
3 changed files with 11 additions and 6 deletions
|
|
@ -67,6 +67,7 @@ var AcePopup = function(parentNode) {
|
||||||
popup.renderer.setStyle("ace_autocomplete");
|
popup.renderer.setStyle("ace_autocomplete");
|
||||||
|
|
||||||
popup.setOption("displayIndentGuides", false);
|
popup.setOption("displayIndentGuides", false);
|
||||||
|
popup.setOption("dragDelay", 150);
|
||||||
|
|
||||||
var noop = function(){};
|
var noop = function(){};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -428,13 +428,17 @@ var TextInput = function(parentNode, host) {
|
||||||
|
|
||||||
this.onContextMenu = function(e) {
|
this.onContextMenu = function(e) {
|
||||||
afterContextMenu = true;
|
afterContextMenu = true;
|
||||||
if (!tempStyle)
|
|
||||||
tempStyle = text.style.cssText;
|
|
||||||
|
|
||||||
text.style.cssText = "z-index:100000;" + (useragent.isIE ? "opacity:0.1;" : "");
|
|
||||||
|
|
||||||
resetSelection(host.selection.isEmpty());
|
resetSelection(host.selection.isEmpty());
|
||||||
host._emit("nativecontextmenu", {target: host, domEvent: e});
|
host._emit("nativecontextmenu", {target: host, domEvent: e});
|
||||||
|
this.moveToMouse(e, true);
|
||||||
|
};
|
||||||
|
|
||||||
|
this.moveToMouse = function(e, bringToFront) {
|
||||||
|
if (!tempStyle)
|
||||||
|
tempStyle = text.style.cssText;
|
||||||
|
text.style.cssText = (bringToFront ? "z-index:100000;" : "")
|
||||||
|
+ (useragent.isIE ? "opacity:0.1;" : "");
|
||||||
|
|
||||||
var rect = host.container.getBoundingClientRect();
|
var rect = host.container.getBoundingClientRect();
|
||||||
var style = dom.computedStyle(host.container);
|
var style = dom.computedStyle(host.container);
|
||||||
var top = rect.top + (parseInt(style.borderTopWidth) || 0);
|
var top = rect.top + (parseInt(style.borderTopWidth) || 0);
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ var MouseHandler = function(editor) {
|
||||||
|
|
||||||
var focusEditor = function(e) {
|
var focusEditor = function(e) {
|
||||||
if (!editor.isFocused() && editor.textInput)
|
if (!editor.isFocused() && editor.textInput)
|
||||||
editor.textInput.onContextMenu(e);
|
editor.textInput.moveToMouse(e);
|
||||||
editor.focus()
|
editor.focus()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue