From 12afd837a092bfadefbce9da6aca3c33f8e886ed Mon Sep 17 00:00:00 2001 From: Dongie Agnir Date: Sun, 27 Dec 2015 21:47:13 -1000 Subject: Ask for reset when option is removed. --- components/script/dom/htmloptionelement.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'components/script/dom/htmloptionelement.rs') diff --git a/components/script/dom/htmloptionelement.rs b/components/script/dom/htmloptionelement.rs index 3aff70c70f7..3e6019384ab 100644 --- a/components/script/dom/htmloptionelement.rs +++ b/components/script/dom/htmloptionelement.rs @@ -210,6 +210,12 @@ impl VirtualMethods for HTMLOptionElement { fn unbind_from_tree(&self, context: &UnbindContext) { self.super_type().unwrap().unbind_from_tree(context); + if let Some(select) = context.parent.inclusive_ancestors() + .filter_map(Root::downcast::) + .next() { + select.ask_for_reset(); + } + let node = self.upcast::(); let el = self.upcast::(); if node.GetParentNode().is_some() { -- cgit v1.2.3