Closed Bug 311053 Opened 14 years ago Closed 11 years ago

Some XUL elements don't respect preventDefault()

Categories

(Core :: XUL, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: neil, Assigned: neil)

References

Details

Attachments

(3 files)

Steps to reproduce problem:
1. Open about:config
2. Enter a filter
3. Tab to the Show All button
4. Press F10
5. Press Space or Enter

Actual results: quick search is cleared

Expected result: quick search is not cleared
Actually, that applies to most of our XBL bindings too, although
event.stopPropagation() can be used on them instead.
I grepped for frames that implemented HandleEvent and I noticed that most of
the HTML ones checked *aStatus while most of the XUL ones did not. I'm guessing
here that we should check *aStatus here and remove all the individual checks.
Attachment #198564 - Flags: superreview?(bryner)
Attachment #198564 - Flags: review?(jst)
Comment on attachment 198564 [details] [diff] [review]
Preliminary patch

I'm not against this change, but this can make it harder to write some event
code in the future if you want to write a handler in frame code that needs to
be notified even if the default was prevented (and do something less than the
default etc). r=jst, but I wouldn't be against flipping this around and simply
fixing the XUL frame code and leaving this place in the code alone.
Attachment #198564 - Flags: review?(jst) → review+
Comment on attachment 198564 [details] [diff] [review]
Preliminary patch

I think I'd rather see the frame HandleEvent implementations fixed.  It's more consistent with the way preventDefault works in the DOM (it doesn't stop propagation).
Attachment #198564 - Flags: superreview?(bryner) → superreview-
Flags: blocking1.9a1? → blocking1.9-
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
OK, so let's do it separately in each frame; I copied nsRootBoxFrame for this.
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #361837 - Flags: review?(enndeakin)
Attachment #361837 - Flags: review?(enndeakin) → review+
Attachment #361837 - Flags: superreview?(jst)
Attachment #361837 - Flags: superreview?(jst) → superreview+
Pushed changeset 0e13ae11c939 to mozilla-central.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Depends on: 480698
Target Milestone: --- → mozilla1.9.2a1
Depends on: 511075
Duplicate of this bug: 604837
You need to log in before you can comment on or make changes to this bug.