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)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dao, Assigned: ewong)

References

Details

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

Attachments

(1 file, 2 obsolete files)

+++ 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
(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: nobody → ewong
Status: NEW → ASSIGNED
Attachment #582751 - Flags: review?(neil)
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+
Attachment #582751 - Attachment is obsolete: true
Attachment #582767 - Flags: review+
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
Fixed comment.
Attachment #582767 - Attachment is obsolete: true
Attachment #582796 - Flags: review+
The typo is still there.
(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!
(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!
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.

Attachment

General

Created:
Updated:
Size: