Closed
Bug 708703
Opened 13 years ago
Closed 13 years ago
Use defaultPrevented instead of the deprecated getPreventDefault() in front-end code
Categories
(SeaMonkey :: General, defect)
SeaMonkey
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: dao, Assigned: ewong)
References
Details
(Whiteboard: [good first bug][lang=js])
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
ewong
:
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=on&find=%2Fsuite%2F&findi=&filter=^[^\0]*%24&hitlimit=&tree=comm-central
Comment 1•13 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #0)
Thanks for reporting this Dao.
For traction on our end, do we have any idea when the deprecation will become obsoletion at this point?
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → ewong
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•13 years ago
|
||
Attachment #582751 -
Flags: review?(neil)
Comment 3•13 years ago
|
||
Comment on attachment 582751 [details] [diff] [review]
Replaced getPreventDefault() with defaultPrevented. (v1)
>diff --git a/suite/common/bookmarks/browser-places.js b/suite/common/bookmarks/browser-places.js
>--- a/suite/common/bookmarks/browser-places.js
>+++ b/suite/common/bookmarks/browser-places.js
>@@ -126,7 +126,7 @@ var StarUI = {
> }
> break;
> case "keypress":
>- if (aEvent.getPreventDefault()) {
>+ if (aEvent.defaultPrevented) {
> // The event has already been consumed inside of the panel.
> break;
> }
Nit: a comment a little further down references this, please fix it too.
Attachment #582751 -
Flags: review?(neil) → review+
Assignee | ||
Comment 4•13 years ago
|
||
Attachment #582751 -
Attachment is obsolete: true
Attachment #582767 -
Flags: review+
Reporter | ||
Comment 5•13 years ago
|
||
Comment on attachment 582767 [details] [diff] [review]
Replaced getPreventDefault() with defaultPrevented. (v2)
>--- a/suite/mailnews/compose/MsgComposeCommands.js
>+++ b/suite/mailnews/compose/MsgComposeCommands.js
>@@ -1859,7 +1859,7 @@ function GenericSendMessage( msgType )
> var msgcomposeWindow = document.getElementById("msgcomposeWindow");
> msgcomposeWindow.setAttribute("msgtype", msgType);
> msgcomposeWindow.dispatchEvent(event);
>- if (event.getPreventDefault())
>+ if (event.gdefaultPrevented)
typo
Assignee | ||
Comment 6•13 years ago
|
||
Fixed comment.
Attachment #582767 -
Attachment is obsolete: true
Attachment #582796 -
Flags: review+
Reporter | ||
Comment 7•13 years ago
|
||
The typo is still there.
Comment 8•13 years ago
|
||
(In reply to Dão Gottwald from comment #5)
> (From update of attachment 582767 [details] [diff] [review])
> >+ if (event.gdefaultPrevented)
> typo
Thanks for spotting that!
Assignee | ||
Comment 9•13 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #7)
> The typo is still there.
Original push: http://hg.mozilla.org/comm-central/rev/7978a944e54d
Bustage push : http://hg.mozilla.org/comm-central/rev/0ca6c359d3c7
Thanks Dao!
Assignee | ||
Updated•13 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•