Bug 35533 - onclick event in select elements don't work
Summary: onclick event in select elements don't work
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL: http://pyther.net/a/test.html
Depends on:
Reported: 2010-03-01 11:38 PST by Matthew
Modified: 2013-02-07 02:57 PST (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Matthew 2010-03-01 11:38:03 PST
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
Comment 1 Alexey Proskuryakov 2010-03-02 16:42:10 PST
What browser are you testing with? Is it Qt or Gtk based?

This test works for me in Safari on Mac OS X.
Comment 2 Matthew 2010-03-02 16:54:04 PST
The problem happens with Midori, uzbl, and chromium so (gtk based).

However the problem also appears to happens with Arora (qt based).
Comment 3 Matthew 2010-03-02 17:03:30 PST
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
Comment 4 Dusty Phillips 2010-03-02 17:14:22 PST
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.
Comment 5 Daniel Michalik 2010-03-03 11:56:50 PST
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.