mirror of https://github.com/vitalif/phantomjs
Pass modifier to mouse events for click/dblclick
A fix for the issue described here: https://github.com/ariya/phantomjs/issues/118671.x
parent
3d80670e22
commit
e40ebb93d7
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue