Relayout text input elements on blur

This commit is contained in:
Manish Goregaokar 2015-12-15 17:52:09 +05:30
parent 1b0053f8b1
commit 23e7dfa57b
5 changed files with 33 additions and 6 deletions

View file

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