Last Comment Bug 707677 - Use defaultPrevented instead of the deprecated getPreventDefault() in front-end code
: Use defaultPrevented instead of the deprecated getPreventDefault() in front-e...
Status: VERIFIED FIXED
[good first bug][mentor=dao][lang=js]
:
Product: Core
Classification: Components
Component: General (show other bugs)
: Trunk
: All All
: -- trivial (vote)
: mozilla11
Assigned To: Jan Bambach [:Jan]
:
Mentors:
Depends on:
Blocks: 691151
  Show dependency treegraph
 
Reported: 2011-12-05 07:30 PST by Dão Gottwald [:dao]
Modified: 2015-04-29 11:23 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
This patch should fix Bug 707677. (13.48 KB, patch)
2011-12-05 12:36 PST, Jan Bambach [:Jan]
no flags Details | Diff | Splinter Review
This patch should fix Bug 707677. (16.87 KB, patch)
2011-12-07 12:55 PST, Jan Bambach [:Jan]
dao+bmo: review+
Details | Diff | Splinter Review
Adding the name to the contributors section. (Optional) (6.97 KB, patch)
2011-12-07 12:56 PST, Jan Bambach [:Jan]
no flags Details | Diff | Splinter Review

Description Dão Gottwald [:dao] 2011-12-05 07:30:24 PST
event.getPreventDefault is deprecated, we should use event.defaultPrevented instead.

Affected files:

http://mxr.mozilla.org/mozilla-central/search?string=getPreventDefault&case=1&find=&findi=&filter=\.%28js|xml|xul|html%29&hitlimit=&tree=mozilla-central
Comment 1 Jan Bambach [:Jan] 2011-12-05 12:36:48 PST
Created attachment 579132 [details] [diff] [review]
This patch should fix Bug 707677.
Comment 2 Dão Gottwald [:dao] 2011-12-05 12:51:07 PST
Did you intentionally leave out content/events/test/test_bug508906.html and content/xul/content/test/test_bug486990.xul?

In browser/base/content/browser-places.js and content/events/test/test_bug493251.html there are comments referring to getPreventDefault(), by the way -- those should be updated as well.
Comment 3 Dão Gottwald [:dao] 2011-12-05 12:53:49 PST
Also, you seem to have missed one instance in toolkit/content/widgets/wizard.xml as well as toolkit/content/widgets/dialog.xml.
Comment 4 Jan Bambach [:Jan] 2011-12-07 12:55:15 PST
Created attachment 579799 [details] [diff] [review]
This patch should fix Bug 707677.
Comment 5 Jan Bambach [:Jan] 2011-12-07 12:56:21 PST
Created attachment 579801 [details] [diff] [review]
Adding the name to the contributors section. (Optional)
Comment 6 Dão Gottwald [:dao] 2011-12-08 00:54:37 PST
Comment on attachment 579799 [details] [diff] [review]
This patch should fix Bug 707677.

Thanks!
Comment 7 Dão Gottwald [:dao] 2011-12-08 00:58:11 PST
Comment on attachment 579801 [details] [diff] [review]
Adding the name to the contributors section. (Optional)

I think we probably shouldn't do this for non-invasive search-and-replace changes. For instance, when another contributor wants to do something in b2g/chrome/content/shell.js and is looking for guidance, you probably wouldn't want that contributor to contact you just because you're in the contributors section of that file.
Comment 9 Ed Morley [:emorley] 2011-12-08 08:28:14 PST
https://hg.mozilla.org/mozilla-central/rev/ccc5f03e6dd2
Comment 10 Jan Bambach [:Jan] 2011-12-08 08:29:09 PST
Thanks a lot! :-) -> Verified

Note You need to log in before you can comment on or make changes to this bug.