Closed
Bug 691151
Opened 13 years ago
Closed 7 years ago
Remove Event.prototype.getPreventDefault
Categories
(Core :: DOM: Events, defect)
Core
DOM: Events
Tracking
()
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: bruant.d, Assigned: bzbarsky)
References
Details
(Keywords: addon-compat, dev-doc-complete, site-compat)
Attachments
(1 file)
(deleted),
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
This is not standard and has a standard alternative (defaultPrevented property).
There is no reason to keep this around forever.
Comment 1•13 years ago
|
||
Need to first remove all its usage from Firefox / Gecko / Thunderbird / etc. then start
warn about its usage, and then remove it.
But yes, we should try to remove it.
Comment 2•13 years ago
|
||
Looks like that wouldn't be too hard: <http://mxr.mozilla.org/comm-central/search?string=getPreventDefault&filter=\bgetPreventDefault>.
Reporter | ||
Updated•13 years ago
|
Keywords: dev-doc-needed
Updated•13 years ago
|
Keywords: addon-compat
Updated•12 years ago
|
Keywords: site-compat
Comment 3•12 years ago
|
||
(In reply to Olli Pettay from comment #1)
> Need to first remove all its usage from Firefox / Gecko / Thunderbird / etc.
> then start warn about its usage, and then remove it.
> But yes, we should try to remove it.
Looks like we started warning about it when there are still 11 in-tree callers...
Comment 4•12 years ago
|
||
Oops, I didn't realize the existence of C++ callers. Reverting for now.
It appears that wikipedia still uses this.
Comment 6•9 years ago
|
||
Posted the site compatibility doc: https://www.fxsitecompat.com/en-US/docs/2015/event-getpreventdefault-will-be-removed/
Comment 7•8 years ago
|
||
Are there any estimates on when getPreventDefault will finally be removed?
Assignee | ||
Comment 8•7 years ago
|
||
Olli, thoughts on removing this?
Telemetry is moderately useless, because some old jQuery versions have:
this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
which will call the method any for any event for which default is _not_ prevented. That said, no one else implements this, and it feels somewhat safe to try removing...
Flags: needinfo?(bugs)
Comment 9•7 years ago
|
||
I guess we could try to remove this early in a cycle. So, next week?
Flags: needinfo?(bugs)
Assignee | ||
Comment 10•7 years ago
|
||
MozReview-Commit-ID: FQ3LzP7rW6e
Attachment #8928179 -
Flags: review?(bugs)
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Updated•7 years ago
|
Attachment #8928179 -
Flags: review?(bugs) → review+
Comment 11•7 years ago
|
||
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3b3a7055f264
Remove Event.getPreventDefault. r=smaug
Comment 12•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Comment 13•7 years ago
|
||
Posted the site compatibility note: https://www.fxsitecompat.com/en-CA/docs/2017/event-getpreventdefault-has-been-removed/
Comment 14•7 years ago
|
||
Updated Firefox 59 for developers. This method was never documented; its only mention is a note on defaultPrevented that you shouldn't use getPreventdefault().
Keywords: dev-doc-needed → dev-doc-complete
Comment 15•7 years ago
|
||
Was DEPRECATED_OPERATION(GetPreventDefault) forgotten?
https://dxr.mozilla.org/mozilla-central/rev/e22e2c9eb81686e958a9448ea3d1e8cd766743e2/dom/base/nsDeprecatedOperationList.h#20
Comment 16•7 years ago
|
||
So it seems. Wanna fix?
Comment 17•7 years ago
|
||
Sure. Filed bug 1433404.
You need to log in
before you can comment on or make changes to this bug.
Description
•