diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2015-12-15 17:52:09 +0530 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2016-01-03 13:18:24 +0530 |
commit | 23e7dfa57b6e4c8aa26dc74b742e65c31abbe50d (patch) | |
tree | 011532c4f1421a19a55843cc8ad5311e4a09c66e /components/script/dom/virtualmethods.rs | |
parent | 1b0053f8b1d26d16fa8bf8eb906a947a8fa291da (diff) | |
download | servo-23e7dfa57b6e4c8aa26dc74b742e65c31abbe50d.tar.gz servo-23e7dfa57b6e4c8aa26dc74b742e65c31abbe50d.zip |
Relayout text input elements on blur
Diffstat (limited to 'components/script/dom/virtualmethods.rs')
-rw-r--r-- | components/script/dom/virtualmethods.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/components/script/dom/virtualmethods.rs b/components/script/dom/virtualmethods.rs index 3540fbddf0f..b60c805c444 100644 --- a/components/script/dom/virtualmethods.rs +++ b/components/script/dom/virtualmethods.rs @@ -102,6 +102,14 @@ pub trait VirtualMethods { } } + /// Called when a previously focused element is no longer focused. + /// Use this to trigger relayouts + fn handle_blur(&self) { + if let Some(s) = self.super_type() { + s.handle_blur(); + } + } + /// https://dom.spec.whatwg.org/#concept-node-adopt-ext fn adopting_steps(&self, old_doc: &Document) { if let Some(ref s) = self.super_type() { |