Use defaultPrevented instead of the deprecated getPreventDefault() in xul/content/static.js

RESOLVED FIXED

Status

Other Applications
ChatZilla
--
trivial
RESOLVED FIXED
6 years ago
3 years ago

People

(Reporter: dao, Assigned: Robert Ginda)

Tracking

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [cz-0.9.90.1])

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

6 years ago
+++ This bug was initially created as a clone of Bug #707677 +++

event.getPreventDefault is deprecated, we should use event.defaultPrevented instead.

Comment 1

5 years ago
Created attachment 659520 [details] [diff] [review]
Replaces deprecated method

As far as I can tell this is all that needs to be done.

Comment 2

5 years ago
Comment on attachment 659520 [details] [diff] [review]
Replaces deprecated method

It looks like Donald's patch still applies.
Attachment #659520 - Flags: review?(rginda)

Comment 3

5 years ago
In general ChatZilla tries to maintain backwards compatibility, how deprecated is the method - and how far back does support for the property go?

Comment 4

5 years ago
Comment on attachment 659520 [details] [diff] [review]
Replaces deprecated method

(In reply to Glen Mailer from comment #3)
> In general ChatZilla tries to maintain backwards compatibility, how
> deprecated is the method - and how far back does support for the property go?

Gecko 6.0 according to https://developer.mozilla.org/en-US/docs/DOM/event.defaultPrevented . So this patch won't be good enough, sadly. :-(
Attachment #659520 - Flags: review?(rginda) → review-

Updated

5 years ago
Depends on: 656954
Created attachment 751684 [details] [diff] [review]
Replaces deprecated method, v2

Patch with polyfill
Attachment #659520 - Attachment is obsolete: true
Attachment #751684 - Flags: review?(gijskruitbosch+bugs)

Comment 6

5 years ago
Created attachment 752049 [details] [diff] [review]
Patch with utility function

Personally, I'm not a fan of prototype messing-abouts, and would prefer something like this. I'll leave it to James to decide.
Attachment #752049 - Flags: review?(silver)

Updated

5 years ago
Attachment #751684 - Flags: review?(gijskruitbosch+bugs) → review?(silver)

Comment 7

5 years ago
Comment on attachment 751684 [details] [diff] [review]
Replaces deprecated method, v2

Even AMO's unreliable checks will probably cry over this method too.
Attachment #751684 - Flags: review?(silver) → review-

Updated

5 years ago
Attachment #752049 - Flags: review?(silver) → review+

Comment 8

5 years ago
Pushed, http://hg.mozilla.org/chatzilla/rev/7076cb689fb4
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [cz-0.9.91]

Updated

3 years ago
Whiteboard: [cz-0.9.91] → [cz-0.9.90.1]
You need to log in before you can comment on or make changes to this bug.