Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webkitMovementX / Y is deprecated (Chrome) #382

Closed
SourceCode opened this issue Feb 10, 2016 · 3 comments
Closed

webkitMovementX / Y is deprecated (Chrome) #382

SourceCode opened this issue Feb 10, 2016 · 3 comments

Comments

@SourceCode
Copy link

While using the 2.0.* version of whoops - this error arrives in the console. Not a major issue but figured I would file a issue since it is deprecated.

screen shot 2016-02-09 at 4 01 52 pm

You may also already be aware - these items just happen to show in the console each time a whoops screen is served.

@staabm
Copy link
Contributor

staabm commented Feb 13, 2016

searching thru the whole codebase (current master) did not find any hit for "movement". are you sure this warning is triggered by whoops?

@SourceCode
Copy link
Author

Ok I dug into this a bit deeper. It definitely is caused by the whoops package - however it is more the case that it has to do with the javascript libraries being included, which does not involve whoops.

The way to see this occur is to open your console and change from 1 stack trace to another. You should see the notification in your console.

I attached 2 screenshots that show examples
whoops1

whoops2

I tried to track these down in the javascript being used but couldn't locate anything. A further search showed a LOT of tickets open on github for many libraries facing this issue. Apparently this is part of an automatic inclusion of the events because they still exist.

Check this github issue for video.js as an example:
videojs/video.js#2548

I'm not sure if you want to close this issue and report it to the libraries being included in the whoops project or just disregard until something breaks.

    event = {};
    // Clone the old object so that we can modify the values event = {};
    // IE8 Doesn't like when you mess with native event properties
    // Firefox returns false for event.hasOwnProperty('type') and other props
    //  which makes copying more difficult.
    // TODO: Probably best to create a whitelist of event props
    for (var key in old) {
      // Safari 6.0.3 warns you if you try to copy deprecated layerX/Y
      // Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation
      // and webkitMovementX/Y
      if (key !== 'layerX' && key !== 'layerY' && key !== 'keyLocation' &&
          key !== 'webkitMovementX' && key !== 'webkitMovementY') {
        // Chrome 32+ warns if you try to copy deprecated returnValue, but
        // we still want to if preventDefault isn't supported (IE8).
        if (!(key === 'returnValue' && old.preventDefault)) {
          event[key] = old[key];
        }
      }
    }

That is how it was addressed in that patch of their project. So finding the tail of it will be difficult because it doesn't actually exist. It's more the case of ensuring it's excluded because it will be deprecated in the future. Which means it's getting included but will go away (as I'm sure you know).

My bets are that this is getting fired when you switch a stack trace and the browser scrolls back to the top of the page. Whatever package you are using that does this would be the package that needs to be notified. Unfortunately I don't have the time to dig that much further to figure that out and follow through.

@denis-sokolov
Copy link
Collaborator

Thank you for your research.

I think we'll keep the warnings until one day we update the js dependency libraries and the warnings are suddenly gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants