mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Fix the condition to keep original logic
Address this PR comment: https://github.com/servo/servo/pull/24489/files#diff-30a18e04d7e0b66aafdf192e416cad44R1472 This commit was failed to add in PR #24489. Issue: #22782
This commit is contained in:
parent
273fe590db
commit
3af931004f
1 changed files with 2 additions and 2 deletions
|
@ -1469,8 +1469,8 @@ impl Document {
|
|||
// however *when* we do it is up to us.
|
||||
// Here, we're dispatching it after the key event so the script has a chance to cancel it
|
||||
// https://www.w3.org/Bugs/Public/show_bug.cgi?id=27337
|
||||
if (keyboard_event.key == Key::Enter && keyboard_event.state == KeyState::Up) ||
|
||||
(keyboard_event.code == Code::Space && keyboard_event.state == KeyState::Down)
|
||||
if (keyboard_event.key == Key::Enter || keyboard_event.code == Code::Space) &&
|
||||
keyboard_event.state == KeyState::Up
|
||||
{
|
||||
let maybe_elem = target.downcast::<Element>();
|
||||
if let Some(el) = maybe_elem {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue