Open Bug 1107064 Opened 9 years ago Updated 2 years ago

click() function not called with combination of disable=true, false, true

Categories

(Core :: DOM: Core & HTML, defect)

34 Branch
x86_64
Windows 7
defect

Tracking

()

ASSIGNED

People

(Reporter: konradg2, Assigned: smaug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0
Build ID: 20141125180439

Steps to reproduce:

1) run this jsfiddle http://jsfiddle.net/a5rt1f60/5/
2) select "1:test 1"
3) select "2:test 2"


Actual results:

Radio button didn't change from "c_codeType_single" to "c_codeType_multi", altrough it was enabled at short time click() was called (you can check that by uncommenting line 25).

You can also select "+++nowa" and then select "2: test2" - "c_codeType_multi" will be click()ed, but then selecting "1: test 1" result in the same err behavior.

PS. I know I can use .checked property to set it, but click() should work in this case as well.
PS2. I have also tested in on newest Chrome Browser and IE, and it works as I described in "expected results".


Expected results:

A click() function for radio button id="c_codeType_multi" should have been called and radio button value should be change to "c_codeType_multi".
Component: JavaScript: Standard Library → DOM
The issue is that in HTMLInputElement::PreHandleEvent we do IsElementDisabledForEvents and pass it the primary frame, but we get the primary frame without flushing.  The frame we get has NS_STYLE_USER_INPUT_DISABLED as the user-input style, because forms.css includes:

  input:disabled { -moz-user-input: disabled }

Olli, we could just flush frames there and pick up the updated styles; any better ideas?
Flags: needinfo?(bugs)
No better ideas. And looks like it would be safe to flush.
Assignee: nobody → bugs
Flags: needinfo?(bugs)
Comment on attachment 8532642 [details] [diff] [review]
patch

r=me, though the orange on try is a bit worrysome.
Attachment #8532642 - Flags: review?(bzbarsky) → review+
Odd. Possibly bugs in tests. Looking.
I Want to Work on This,,Where do i start
Oops, I lost this bug.
I should look at the test failures and either fix the tests or the patch.

Avinash, might be better if you could find another bug to work on.
http://www.joshmatthews.net/bugsahoy/?dom=1 may give some good candidates.

(Thanks for reminding me about this bug!)
Flags: needinfo?(bugs)
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(bugs)
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: