mirror of
https://github.com/servo/servo
synced 2026-05-02 20:32:02 +02:00
ask for reset and pick on option insert.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user