Fix Webkit context menu on second click
This commit is contained in:
parent
5120528cf1
commit
ad2d31eef4
1 changed files with 4 additions and 2 deletions
|
|
@ -490,10 +490,12 @@ var TextInput = function(parentNode, host) {
|
||||||
|
|
||||||
// firefox fires contextmenu event after opening it
|
// firefox fires contextmenu event after opening it
|
||||||
if (!useragent.isGecko || useragent.isMac) {
|
if (!useragent.isGecko || useragent.isMac) {
|
||||||
event.addListener(text, "contextmenu", function(e) {
|
var onContextMenu = function(e) {
|
||||||
host.textInput.onContextMenu(e);
|
host.textInput.onContextMenu(e);
|
||||||
onContextMenuClose();
|
onContextMenuClose();
|
||||||
});
|
};
|
||||||
|
event.addListener(host.renderer.scroller, "contextmenu", onContextMenu);
|
||||||
|
event.addListener(text, "contextmenu", onContextMenu);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue