Bug 35533
| Summary: | onclick event in select elements don't work | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Matthew <pyther> |
| Component: | Forms | Assignee: | Nobody <webkit-unassigned> |
| Status: | UNCONFIRMED | ||
| Severity: | Normal | CC: | dev, dev, dusty |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| URL: | http://pyther.net/a/test.html | ||
Matthew
As the summary states onclick events on select objects do not work.
Here is a sample page: http://pyther.net/a/test.html
onchange works, but onclick does not in webkit. This works in firefox.
According to w3schools onclick is a supported event: http://www.w3schools.com/TAGS/tag_select.asp
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
What browser are you testing with? Is it Qt or Gtk based?
This test works for me in Safari on Mac OS X.
Matthew
The problem happens with Midori, uzbl, and chromium so (gtk based).
However the problem also appears to happens with Arora (qt based).
Matthew
Just to clarify this happens the test on on the dropdown boxes not the submit button. I removed the submit button on the test page.
Expected Behavior:
onChange - JS alert box when dropdown item is changed
onClick - JS alert box when dropdown is clicked
Actual Results
onchange - works - alert box shows up when item is changed
onclick - does NOT work - alert box does not appear
Dusty Phillips
Under Chromium for Linux, in pyther's test page, I don't get the onclick alert until I have clicked twice on the select box. Clicking once drops down the menu, then if I click again on the select box (NOT on the menu) the onclick is finally fired.
Daniel Michalik
I confirm this bug on WebkitGtk. I use the current git head and I don't get the onclick alert. I tried what Dusty Phillips suggested as well, but even if I click the dropdown twice I don't get the alert.
As reported before the onchange works as expected.