Open Bug 1255260 Opened 5 years ago Updated 2 years ago

Incorrect number of keyDown events when using modifiers in SendKeysToElement

Categories

(Testing :: Marionette, defect, P2)

45 Branch
defect

Tracking

(Not tracked)

People

(Reporter: titus.fortner, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Keywords: pi-marionette-server)

Attachments

(2 files)

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
Attached file www/keydownPage.html
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
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.