mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
fixup! Fixed issue #11651 (Do not fire a blur event when calling .focus() on a focused element)
This commit is contained in:
parent
35aa24eb4c
commit
01c3640e5f
2 changed files with 20 additions and 22 deletions
|
@ -251,9 +251,6 @@ impl HTMLElementMethods for HTMLElement {
|
|||
fn Focus(&self) {
|
||||
// TODO: Mark the element as locked for focus and run the focusing steps.
|
||||
// https://html.spec.whatwg.org/multipage/#focusing-steps
|
||||
if self.upcast::<Element>().focus_state() {
|
||||
return;
|
||||
}
|
||||
let document = document_from_node(self);
|
||||
document.begin_focus_transaction();
|
||||
document.request_focus(self.upcast());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue