Fix Webkit context menu on second click

This commit is contained in:
DanyaPostfactum 2013-10-27 20:51:15 +11:00
commit ad2d31eef4

View file

@ -490,10 +490,12 @@ var TextInput = function(parentNode, host) {
// firefox fires contextmenu event after opening it
if (!useragent.isGecko || useragent.isMac) {
event.addListener(text, "contextmenu", function(e) {
var onContextMenu = function(e) {
host.textInput.onContextMenu(e);
onContextMenuClose();
});
};
event.addListener(host.renderer.scroller, "contextmenu", onContextMenu);
event.addListener(text, "contextmenu", onContextMenu);
}
};