Incorrect number of keyDown events when using modifiers in SendKeysToElement

NEW
Unassigned

Status

defect
P2
normal
3 years ago
8 months ago

People

(Reporter: titus.fortner, Unassigned)

Tracking

(Depends on 1 bug, Blocks 1 bug, {pi-marionette-server})

45 Branch
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

Reporter

Description

3 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36

Steps to reproduce:

Counted key presses for key combinations
https://github.com/watir/watirspec/blob/master/element_spec.rb#L309

This is the input field:
<input id="receiver" onkeydown="log(this)" type="text">

I'm sending cmd+a and it shows up as 3 onkeydown commands

I think it might be because we are appending a null key to the array getting sent?
(the code execution is the same as this one: https://gist.github.com/titusfortner/6f5ef27c96c90a15f57e)



Actual results:

3 key presses recorded


Expected results:

2 key presses recorded
Summary: Key Downs → Incorrect number of keyDown events when using modifiers

Comment 1

3 years ago

Comment 3

3 years ago
I created a unit test for marionette that shows this issue (See attachements www/keydownPage.html and tests/unit/test_keydownbug.py).

When pressing Alt+Meta+n it outputs "keydown 224 keyup 224 keydown 18 keyup 18 keydown 78 keyup 78" instead of "keydown 18 keydown 224 keydown 78 keyup 224 keyup 18".
Status: UNCONFIRMED → NEW
Ever confirmed: true
Is this still the case?
Flags: needinfo?(titus.fortner)
Priority: -- → P2
Reporter

Comment 5

a year ago
Yes, I can confirm this is still the case in Firefox 60
Flags: needinfo?(titus.fortner)
This bug has nothing to do with actions but with SendKeysToElement. We would have to check if using the Actions API fixes it. If yes then it would be fixed by bug 1418995. Marking it as dependency for now.
No longer blocks: webdriver-actions
Depends on: 1418995
Summary: Incorrect number of keyDown events when using modifiers → Incorrect number of keyDown events when using modifiers in SendKeysToElement
Duplicate of this bug: 1306259
Attachment #8797622 - Attachment mime type: text/x-python-script → text/plain
You need to log in before you can comment on or make changes to this bug.