Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

"body.scrollTop is deprecated in strict mode" #1658

Closed
ucarion opened this issue Jan 24, 2014 · 2 comments
Closed

"body.scrollTop is deprecated in strict mode" #1658

ucarion opened this issue Jan 24, 2014 · 2 comments

Comments

@ucarion
Copy link

ucarion commented Jan 24, 2014

If 'use strict' is in effect when I use typeahead, I get these messages in the console:

body.scrollTop is deprecated in strict mode. Please use 'documentElement.scrollTop' if in strict mode and 'body.scrollTop' only if in quirks mode.
body.scrollLeft is deprecated in strict mode. Please use 'documentElement.scrollLeft' if in strict mode and 'body.scrollLeft' only if in quirks mode. 

I think the error comes from here:

top: boundingClientRect.top + ($window.pageYOffset || $document[0].body.scrollTop || $document[0].documentElement.scrollTop),
left: boundingClientRect.left + ($window.pageXOffset || $document[0].body.scrollLeft  || $document[0].documentElement.scrollLeft)

It'd be great if these warnings could be avoided while still enjoying the benefits of use strict.

@pkozlowski-opensource
Copy link
Member

@ulyssecarion what is a browser you are using? Could you please provide a minimal plunk?

@mvhecke
Copy link
Contributor

mvhecke commented Jan 24, 2014

@pkozlowski-opensource I can confirm this behavior in Chrome 32.0.1700.77 which occurs in all tooltips, the tooltips in the documentation are a good example.

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

No branches or pull requests

3 participants