mirror of
https://github.com/servo/servo.git
synced 2025-07-28 01:30:32 +01:00
Relayout text input elements on blur
This commit is contained in:
parent
1b0053f8b1
commit
23e7dfa57b
5 changed files with 33 additions and 6 deletions
|
@ -72,6 +72,7 @@ use dom::touchevent::TouchEvent;
|
|||
use dom::touchlist::TouchList;
|
||||
use dom::treewalker::TreeWalker;
|
||||
use dom::uievent::UIEvent;
|
||||
use dom::virtualmethods::{VirtualMethods, vtable_for};
|
||||
use dom::window::{ReflowReason, Window};
|
||||
use euclid::point::Point2D;
|
||||
use html5ever::tree_builder::{LimitedQuirks, NoQuirks, Quirks, QuirksMode};
|
||||
|
@ -593,6 +594,8 @@ impl Document {
|
|||
|
||||
if let Some(ref elem) = self.focused.get() {
|
||||
elem.set_focus_state(false);
|
||||
let node = vtable_for(&elem.upcast::<Node>());
|
||||
node.handle_blur();
|
||||
}
|
||||
|
||||
self.focused.set(self.possibly_focused.get().r());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue