Closed Bug 2058556 Opened 1 month ago Closed 1 month ago

When performing a double-click while holding down the Ctrl key using the Actions API, the dblclick event does not fire.

Categories

(Remote Protocol :: Agent, defect, P3)

defect

Tracking

(firefox155 fixed)

RESOLVED FIXED
155 Branch
Tracking Status
firefox155 --- fixed

People

(Reporter: Sasha, Assigned: nirmaladvani, Mentored)

References

()

Details

(Whiteboard: [webdriver:m21][webdriver:external][wptsync upstream][webdriver:relnote])

Attachments

(1 file)

Reported via https://github.com/mozilla/geckodriver/issues/2253.

Performing a double-click while holding down the Ctrl key, e.g., with:

button = driver.find_element(By.CSS_SELECTOR, "button")
ActionChains(driver)\
    .key_down(Keys.CONTROL)\
    .double_click(button)\
    .key_up(Keys.CONTROL)\
    .perform()

produces only two click events but no dblclick event on all platforms.

From my understanding, that is correct behavior for Mac that results in the context menu being open in this case, but from my testing of Firefox on Linux we should synthesize the double click for other platforms. So I think the code here instead of:

    if (mouseEvent.ctrlKey) {
      if (lazy.AppInfo.isMac) {
        mouseEvent.button = 2;
        state.clickTracker.reset();
      }
    } else {
      mouseEvent.clickCount = state.clickTracker.count + 1;
    }

should be:

    if (mouseEvent.ctrlKey && lazy.AppInfo.isMac) {
        mouseEvent.button = 2;
        state.clickTracker.reset();
    } else {
      mouseEvent.clickCount = state.clickTracker.count + 1;
    }
Mentor: aborovova
Priority: -- → P3
Whiteboard: [lang=js][webdriver:backlog]
Severity: -- → S3
Assignee: nobody → nirmaladvani
Status: NEW → ASSIGNED

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/61807 for changes under testing/web-platform/tests

Whiteboard: [lang=js][webdriver:backlog] → [lang=js][webdriver:backlog], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch

Upstream PR merged by moz-wptsync-bot

Whiteboard: [lang=js][webdriver:backlog], [wptsync upstream] → [webdriver:m21][webdriver:external][wptsync upstream]
Whiteboard: [webdriver:m21][webdriver:external][wptsync upstream] → [webdriver:m21][webdriver:external][wptsync upstream][webdriver:relnote]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: