Skip to content
Permalink
Browse files

ask for reset and pick on option insert.

  • Loading branch information...
dagnir committed Oct 23, 2015
1 parent c070c7a commit 663801ed79eefc6d20511cade9efb6cdf6e905dc
Showing with 9 additions and 0 deletions.
  1. +9 −0 components/script/dom/htmloptionelement.rs
@@ -197,6 +197,15 @@ impl VirtualMethods for HTMLOptionElement {
}

self.upcast::<Element>().check_parent_disabled_state_for_option();

let node = self.upcast::<Node>();
if self.Selected() {
if let Some(select) = node.ancestors()
.filter_map(Root::downcast::<HTMLSelectElement>)
.next() {
select.pick_option(self);
}
}
}

fn unbind_from_tree(&self, tree_in_doc: bool) {

0 comments on commit 663801e

Please sign in to comment.
You can’t perform that action at this time.