mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Added call to event.PreventDefault on html text inputs and textareas.
This change should prevent page scrolling when up/down buttons are pressed.
This commit is contained in:
parent
abf2dfea05
commit
4adf502846
2 changed files with 3 additions and 0 deletions
|
@ -656,6 +656,7 @@ impl VirtualMethods for HTMLInputElement {
|
|||
}
|
||||
RedrawSelection => {
|
||||
self.force_relayout();
|
||||
event.PreventDefault();
|
||||
}
|
||||
Nothing => (),
|
||||
}
|
||||
|
|
|
@ -352,9 +352,11 @@ impl VirtualMethods for HTMLTextAreaElement {
|
|||
}
|
||||
|
||||
self.force_relayout();
|
||||
event.PreventDefault();
|
||||
}
|
||||
KeyReaction::RedrawSelection => {
|
||||
self.force_relayout();
|
||||
event.PreventDefault();
|
||||
}
|
||||
KeyReaction::Nothing => (),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue