mirror of
https://github.com/servo/servo
synced 2026-05-09 08:32:31 +02:00
There ~was~ has been a
[bug](https://github.com/servo/servo/issues/37579#issuecomment-2990762713)
in spec. Our workaround has been: for every keyup/pointerup, we remove a
corresponding entry in `input_cancel_list`.
But we missed one thing: it is possible to only dispatch keydown in
[element send
keys](https://w3c.github.io/webdriver/#dfn-element-send-keys). In that
case, we inserted an entry into `input_cancel_list` but removes Id from
`input_state_table` in the end. This causes a panic with a followup
[release actions](https://w3c.github.io/webdriver/#dfn-release-actions).
This PR makes sure we only remove if it is safe.
Testing: CI no longer panic on
dc9696c27d/components/webdriver_server/actions.rs (L338)
for some testdriver tests.
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>