Closed Bug 708702 Opened 13 years ago Closed 13 years ago

Use defaultPrevented instead of the deprecated getPreventDefault() in front-end code

Categories

(Thunderbird :: General, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 13.0

People

(Reporter: dao, Assigned: trunga0)

References

Details

(Whiteboard: [good first bug][lang=js])

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #707677 +++ event.getPreventDefault is deprecated, event.defaultPrevented should be used instead. Affected files: http://mxr.mozilla.org/comm-central/search?string=getPreventDefault&case=1&find=%2Fmail%2F&findi=&filter=^[^\0]*%24&hitlimit=&tree=comm-central
I would like to try this bug.
Great! Let me know if you need help.
Assignee: nobody → trunga0
Status: NEW → ASSIGNED
Hi Gottwald, I changed all the depreciated methods except for the file jquery-1.6.4.min.js Can you help me with this file, I don't fully understand the part that need changing: http://mxr.mozilla.org/comm-central/source/mail/jquery/jquery-1.6.4.min.js#3 * The part is: f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?D:C):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0} I'm just wondering if changing only the a.getPreventDefault&&a.getPreventDefault()?D:C into a.defaultPrevented?D:C is okay or not?
You can just leave out jquery-1.6.4.min.js. It will automatically use defaultPrevented if getPreventDefault isn't defined.
Attached patch Propose patch (deleted) — Splinter Review
Please check if I did this right. Thank you.
Comment on attachment 593188 [details] [diff] [review] Propose patch Looks good to me.
Attachment #593188 - Flags: review?(mbanner)
Comment on attachment 593188 [details] [diff] [review] Propose patch Looks good, thanks for the patch.
Attachment #593188 - Flags: review?(mbanner) → review+
Checked in: http://hg.mozilla.org/comm-central/rev/a489b0bb0a7f Thanks for the patch.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 13.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: