Special keys don't work on editable elements unless the `Shift` key is pressed
Categories
(Remote Protocol :: Marionette, defect, P3)
Tracking
(Not tracked)
People
(Reporter: whimboo, Unassigned)
References
(Blocks 1 open bug)
Details
Originally reported as: https://github.com/mozilla/geckodriver/issues/1508
What happens here is basically:
The problem seems to be related to pressing those special keys without having the Shift
key holding down. The following is an example for Keys.HOME
:
1550746708889 webdriver::server DEBUG -> POST /session/758278fc-426a-8c40-ad1e-b7f26ff00384/actions {"actions": [{"parameters": {"pointerType": "mouse"}, "type": "pointer", "id": "mouse", "actions": [{"duration": 0, "type": "pause"}, {"duration": 0, "type": "pause"}]}, {"type": "key", "id": "key", "actions": [{"type": "keyDown", "value": "\ue011"}, {"type": "keyUp", "value": "\ue011"}]}]}
1550746708898 Marionette DEBUG 0 -> [0,5,"WebDriver:PerformActions",{"actions":[{"actions":[{"duration":0,"type":"pause"},{"duration":0,"type":"pause"}],"id":"mo ... ouse"},"type":"pointer"},{"actions":[{"type":"keyDown","value":""},{"type":"keyUp","value":""}],"id":"key","type":"key"}]}]
When I modify the testcase and press/hold Shift
while pressing the HOME
key, all the text is getting selected up to the first character. Not sure why the cursor isn't moved without holding Shift.
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Comment 2•3 years ago
|
||
See https://bugzilla.mozilla.org/show_bug.cgi?id=1722021#c2 for more investigation from GJ.
Short summary is that:
- a similar bug can be triggered by simulating an additional Left key once you are at the beginning of the editable element
- using Home on another line than the first line works fine
So it seems to be related to trying to move the cursor to the beginning of the editable.
Note that in Bug 1722021, the issue was reported on a textarea, so it's not only about contenteditable elements (although I think internally, both shared the same implementation).
Updated•2 years ago
|
Updated•1 year ago
|
Description
•