mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Specific instances of activatable elements may not be activatable (fixes #4765
This commit is contained in:
parent
a7e29939a1
commit
26732403b9
3 changed files with 20 additions and 1 deletions
|
@ -1449,7 +1449,11 @@ impl<'a> ActivationElementHelpers<'a> for JSRef<'a, Element> {
|
|||
match node.type_id() {
|
||||
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLInputElement)) => {
|
||||
let element: &'a JSRef<'a, HTMLInputElement> = HTMLInputElementCast::to_borrowed_ref(self).unwrap();
|
||||
Some(element as &'a (Activatable + 'a))
|
||||
if element.is_instance_activatable() {
|
||||
Some(element as &'a (Activatable + 'a))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
},
|
||||
_ => {
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue