Closed Bug 827018 Opened 9 years ago Closed 9 years ago

Bogus context menu for disabled text fields

Categories

(SeaMonkey :: UI Design, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey2.17

People

(Reporter: neil, Assigned: neil)

References

Details

Attachments

(1 file)

As of bug 816340 we now get a context menu for disabled text fields, however our context menu code tries to get the undo/copy/etc state of the text field, and either simply fails or gets bogus values from the window rather than the text field.
Attached patch Proposed patchSplinter Review
* Added isTextBoxEnabled function that uses new API from bug 816340
* Tweaked isTargetATextBox to ignore disabled text boxes
* Tweaked spell check code to use above methods to detect enable text boxes

This way we just get a plain document context menu when you right-click on a disabled text box.
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #698293 - Flags: review?(philip.chee)
Comment on attachment 698293 [details] [diff] [review]
Proposed patch

Tested on form input elements and multi-line text areas. r=me.
Attachment #698293 - Flags: review?(philip.chee) → review+
Pushed comm-central changeset 847222e889c3.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.17
You need to log in before you can comment on or make changes to this bug.