Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Use standard event.preventDefault when available (event.returnValue is deprecated) #4557

Closed
@jasford

Description

@jasford

I'm getting this warning from Chrome:

event.returnValue is deprecated. Please use the standard event.preventDefault() instead.

Pointing to these lines of angular.js:

event.isDefaultPrevented = function() {
  return event.defaultPrevented || event.returnValue == false;
}

This is a deprecation warning. Everything still works just fine, but it seems like the issue should be addressed by AngularJS. I'm still new enough to AngularJS that I don't feel comfortable putting together a pull request myself.

Note that my Chrome version is 31.0.1650.26 beta


EDIT: This is not a jQuery issue. I'm providing links to the jQuery tickets below for reference since the issue is similar. I am not using jQuery at all, so simply upgrading jQuery will not resolve the issue.


For reference, these jQuery tickets looks very similar. The first one, flagged as a duplicate of the second, shows the exact same Chrome warning message I'm seeing. The second one shows the fix jQuery made to begin using the standard event.preventDefault:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions