Pass modifier to mouse events for click/dblclick

A fix for the issue described here:

https://github.com/ariya/phantomjs/issues/11867
1.x
Brad Daily 2014-01-01 11:06:11 -05:00
parent 3d80670e22
commit e40ebb93d7
1 changed files with 4 additions and 4 deletions

View File

@ -1440,11 +1440,11 @@ void WebPage::sendEvent(const QString &type, const QVariant &arg1, const QVarian
// MouseButtonDblClick event by itself; it must be accompanied
// by a preceding press-release, and a following release.
if (type == "click" || type == "doubleclick") {
sendEvent("mousedown", arg1, arg2, mouseButton);
sendEvent("mouseup", arg1, arg2, mouseButton);
sendEvent("mousedown", arg1, arg2, mouseButton, modifierArg);
sendEvent("mouseup", arg1, arg2, mouseButton, modifierArg);
if (type == "doubleclick") {
sendEvent("mousedoubleclick", arg1, arg2, mouseButton);
sendEvent("mouseup", arg1, arg2, mouseButton);
sendEvent("mousedoubleclick", arg1, arg2, mouseButton, modifierArg);
sendEvent("mouseup", arg1, arg2, mouseButton, modifierArg);
}
return;
}