mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
ask for reset and pick on option insert.
This commit is contained in:
parent
c070c7ad30
commit
663801ed79
1 changed files with 9 additions and 0 deletions
|
@ -197,6 +197,15 @@ impl VirtualMethods for HTMLOptionElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
self.upcast::<Element>().check_parent_disabled_state_for_option();
|
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) {
|
fn unbind_from_tree(&self, tree_in_doc: bool) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue