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)
Thunderbird
General
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 13.0
People
(Reporter: dao, Assigned: trunga0)
References
Details
(Whiteboard: [good first bug][lang=js])
Attachments
(1 file)
(deleted),
patch
|
standard8
:
review+
|
Details | Diff | Splinter Review |
+++ 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
Assignee | ||
Comment 1•13 years ago
|
||
I would like to try this bug.
Reporter | ||
Comment 2•13 years ago
|
||
Great! Let me know if you need help.
Assignee: nobody → trunga0
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•13 years ago
|
||
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?
Reporter | ||
Comment 4•13 years ago
|
||
You can just leave out jquery-1.6.4.min.js. It will automatically use defaultPrevented if getPreventDefault isn't defined.
Assignee | ||
Comment 5•13 years ago
|
||
Please check if I did this right. Thank you.
Reporter | ||
Comment 6•13 years ago
|
||
Comment on attachment 593188 [details] [diff] [review]
Propose patch
Looks good to me.
Attachment #593188 -
Flags: review?(mbanner)
Comment 7•13 years ago
|
||
Comment on attachment 593188 [details] [diff] [review]
Propose patch
Looks good, thanks for the patch.
Attachment #593188 -
Flags: review?(mbanner) → review+
Updated•13 years ago
|
Keywords: checkin-needed
Comment 8•13 years ago
|
||
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.
Description
•