Closed Bug 72226 Opened 24 years ago Closed 24 years ago

[FIX]Disabled items change visual state

Categories

(Core :: Layout: Form Controls, defect)

defect
Not set
critical

Tracking

()

VERIFIED FIXED
mozilla0.8.1

People

(Reporter: rods, Assigned: rods)

References

Details

(Keywords: regression, Whiteboard: fix in hand for 0.8.1)

Attachments

(2 files)

Somebody else broke this (I think joki) but it did so me whereI didn't have some code I should have.
This is related to bug 58855 Patch: Index: nsListControlFrame.cpp =================================================================== RCS file: /cvsroot/mozilla/layout/html/forms/src/nsListControlFrame.cpp,v retrieving revision 1.183 diff -u -r1.183 nsListControlFrame.cpp --- nsListControlFrame.cpp 2001/03/13 01:47:16 1.183 +++ nsListControlFrame.cpp 2001/03/16 20:42:28 @@ -3389,7 +3389,10 @@ if (isDroppedDown) { PRInt32 oldIndex; PRInt32 curIndex = mSelectedIndex; - if (NS_SUCCEEDED(GetIndexFromDOMEvent(aMouseEvent, oldIndex, curIndex))) { + PRBool optionIsDisabled = PR_FALSE; + nsresult rv = IsTargetOptionDisabled(optionIsDisabled); + if (NS_SUCCEEDED(GetIndexFromDOMEvent(aMouseEvent, oldIndex, curIndex)) & & + NS_SUCCEEDED(rv) && !optionIsDisabled) { mSelectedIndex = curIndex; mOldSelectedIndex = oldIndex; if (kNothingSelected != mSelectedIndex) {
Status: NEW → ASSIGNED
Keywords: regression
Summary: Disabled items change visual state → [FIX]Disabled items change visual state
Whiteboard: fix in hand
Target Milestone: --- → mozilla0.8.1
Rod, is this safe for 0.8.1?
Shouldn't + PRBool optionIsDisabled = PR_FALSE; + nsresult rv = IsTargetOptionDisabled(optionIsDisabled); be inside of the if statement? Why do you care if the option is disabled if GetIndexFromDOMEvent falis?
Looks good to me: [s]r=attinasi
Whiteboard: fix in hand → fix in hand for 0.8.1
Who should give another r/sr=? Cc'ing waterson. /be
Keywords: mozilla0.8.1
looks good, r=waterson
Fixed on branch, I need to check in on tip
fixed in tip and branch
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
rods: Could you please provide some kind of testcase, to help me verify this, because its not very clear from description how to reproduce this.
Verifying by developer's coments.
Status: RESOLVED → VERIFIED
Depends on: 888981
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: