Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up`input.onchange` is never called #9575
Comments
|
/cc @paulrouget |
|
The checkbox and radio code dispatches a "change" event, but the oddly-named |
|
To support this we may need to add a focus/blur virtual method. I don't particularly like adding virtual methods, though. (Aside: This is another one of those events which gets messed up totally if you change the input element's |
|
I added a pull request creating a virtual method as mentioned by Manishearth. Please let me know if you'd rather follow a different approach. |
Dispatch change event for HTMLInputElement. I took a stab at #9575. This is my first pull request on servo so please bear with me :-). I added a new virtual function `before_handle_event` which is a little more generic than needed but it looks like it will be needed for other things? At least judging by Gecko's codebase. Please let me know if you'd rather have a method just for blur. I'm not quite sure why I couldn't use atom!("blur") instead of Atom::from("blur"). If this is the right direction I can write tests for this change (probably importing them if there aren't any already). --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #9575 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12475) <!-- Reviewable:end -->
I believe change events are never dispatched. Here is simple example
Type
sin input & click blanch space. You should see following:in servo you'll see nothing.