Skip to content

Commit

Permalink
Ask for reset when option is removed.
Browse files Browse the repository at this point in the history
  • Loading branch information
dagnir committed Dec 28, 2015
1 parent 941653d commit 12afd83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 6 additions & 0 deletions components/script/dom/htmloptionelement.rs
Expand Up @@ -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::<HTMLSelectElement>)
.next() {
select.ask_for_reset();
}

let node = self.upcast::<Node>();
let el = self.upcast::<Element>();
if node.GetParentNode().is_some() {
Expand Down

This file was deleted.

0 comments on commit 12afd83

Please sign in to comment.