From e40ebb93d71927701e00be777d1bc8732be1b901 Mon Sep 17 00:00:00 2001 From: Brad Daily Date: Wed, 1 Jan 2014 11:06:11 -0500 Subject: [PATCH] Pass modifier to mouse events for click/dblclick A fix for the issue described here: https://github.com/ariya/phantomjs/issues/11867 --- src/webpage.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/webpage.cpp b/src/webpage.cpp index 2b86f604..032533c5 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -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; }