Closed Bug 330244 Opened 19 years ago Closed 19 years ago

Replace obsolete preventBubble() calls with stopPropagation() calls

Categories

(Calendar :: Internal Components, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ssitter, Assigned: ssitter)

References

()

Details

Attachments

(1 file)

Replace obsolete preventBubble() calls with stopPropagation() calls As the work on events is ongoing we should replace obsolete calls to preventBubble() with calls to stopPropagation(). (See Bug 105280 comment #2) preventBubble() is used in: /calendar/resources/content/datetimepickers/minimonth.xml, line 118 /calendar/resources/content/datetimepickers/minimonth.xml, line 136 /calendar/base/content/calendar-view-core.xml, line 237 /calendar/base/content/calendar-multiday-view.xml, line 231 /calendar/base/content/calendar-multiday-view.xml, line 239 /calendar/base/content/calendar-multiday-view.xml, line 1392 /calendar/base/content/calendar-multiday-view.xml, line 1436 /calendar/base/content/calendar-month-view.xml, line 365 /calendar/base/content/calendar-month-view.xml, line 371
Attached patch patchSplinter Review
Assignee: base → ssitter
Status: NEW → ASSIGNED
Attachment #214835 - Flags: first-review?(mvl)
Comment on attachment 214835 [details] [diff] [review] patch This patch scares me. IF preventBubble is broken, replacing it with something that does work means that functionalitiy might change. I think we need to split this in small, reviewable and testable parts.
As I understand it preventBubble is NOT broken. It is just obsolete and stopPropagation should be used instead. From looking at the source stopPropagation() http://lxr.mozilla.org/mozilla/source/content/events/src/nsDOMEvent.cpp#312 preventBubble() http://lxr.mozilla.org/mozilla/source/content/events/src/nsDOMEvent.cpp#319 preventCapture() (not used in calendar) http://lxr.mozilla.org/mozilla/source/content/events/src/nsDOMEvent.cpp#328 all three methods do the same. During testing everything (drag'n'drop, context menus, clicking, ...) worked as before. But if you want it I can defer or split up this patch.
FYI, preventBubble will be most probably removed quite soon and all callers should start using stopPropagation.
Attachment #214835 - Flags: first-review?(mvl) → first-review+
patch checked in
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Michiel, can you check this again please? According to bonsai the patch has been applied to /calendar/resources/content/datetimepickers/minimonth.xml only. The changes made to /calendar/base/content/calendar-multiday-view.xml /calendar/base/content/calendar-month-view.xml /calendar/base/content/calendar-view-core.xml are missing.
Checked in the rest of the patch. Not sure what went wrong at the first try.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: