mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
script: Prevent activation of disabled select elements (#42079)
This change also adjusts the styles of disabled select elements such that the text appears grayed out, like in firefox: <img width="480" height="84" alt="image" src="https://github.com/user-attachments/assets/d36325f5-c811-492b-9510-7a32efd5fd7b" /> Testing: No tests. I think it would be possible to write a webdriver test for this? It didn't seem worth the effort, if someone can point me to the relevant resources then I'm happy to write one ^^ Fixes: https://github.com/servo/servo/issues/42075 --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
@@ -833,7 +833,7 @@ impl Activatable for HTMLSelectElement {
|
||||
}
|
||||
|
||||
fn is_instance_activatable(&self) -> bool {
|
||||
true
|
||||
!self.upcast::<Element>().disabled_state()
|
||||
}
|
||||
|
||||
fn activation_behavior(&self, _event: &Event, _target: &EventTarget, _can_gc: CanGc) {
|
||||
|
||||
Reference in New Issue
Block a user