fixup! Fixed issue #11651 (Do not fire a blur event when calling .focus() on a focused element)

This commit is contained in:
Davide Giovannini 2016-06-10 11:36:08 +02:00
parent 35aa24eb4c
commit 01c3640e5f
2 changed files with 20 additions and 22 deletions

View file

@ -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());