Skip to main content

Bug Tracker

Side navigation

#10494 closed bug (cantfix)

Opened October 14, 2011 01:05PM UTC

Closed October 19, 2011 06:09PM UTC

Radio button checked state inconsistent with e.preventDefault()

Reported by: halcyon1234 Owned by:
Priority: low Milestone: None
Component: event Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:

Click on a Radio Button that is part of a group. No radio button in the group is clicked yet. That radio button's click handler contains e.preventDefault().

Expected: That radio button will not become checked after any click, leaving the group "empty".

Result: The clicked radiobutton becomes checked. All further clicks work as expected.

Other note: I don't know if this is expected, but $(this).is(":checked") returns True, even though e.preventDefault() keeps it from retaining its check. I would have expected it never get checked in the first place, rather than become checked, then become unchecked. Could this "set/unset" check be the reason why the first radio button becomes checked-- because the browser doesn't support "clear checks from radio button group"?

Attachments (0)
Change History (2)

Changed October 14, 2011 02:56PM UTC by dmethvin comment:1

Originally asked here:

Here's a simpler test case:

But it also fails without jQuery:

This looks like a browser bug to me, one that we cannot easily fix since the browser is just ignoring preventDefault. Both Chrome and Firefox are on a fast release cycle, so if it is truly a bug it should be possible to report this to them and get it fixed.

The "other note" is a dup of #3827 but the main issue is not.

Changed October 19, 2011 06:09PM UTC by timmywil comment:2

component: unfiledevent
priority: undecidedlow
resolution: → cantfix
status: newclosed