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

Incorrect focus when 'persistent': true #86

Open
RaduGrama opened this issue Jul 10, 2015 · 8 comments
Open

Incorrect focus when 'persistent': true #86

RaduGrama opened this issue Jul 10, 2015 · 8 comments

Comments

@RaduGrama
Copy link

I am experiencing unexpected focus when using 'persistent': true. The page seems to scroll to the last element formatter is applied to, and this is issue appears with formatter.js as well as jquery.formatter.js.

Take a look at http://jsfiddle.net/46FNG/67/, there's an input all the way at the top, then a bunch of
tags, then a few elements that formatter applies to. The page scrolls to those elements at the bottom of the page instead of staying at the top.

@paulyi326
Copy link

I am experiencing the same problem, but only in IE.

@imposibrus
Copy link

Same problem, Ubuntu 14.04 x64 in Chrome 45.0.2454.93 and Firefox 40.0.3

@khmelevskii
Copy link

+1

@dogagenc
Copy link

Same in latest versions of Chrome, Firefox in both of Mac and Windows.

@smaury
Copy link

smaury commented Feb 19, 2016

Just made a pull request about this issue:
https://github.com/firstopinion/formatter.js/pull/94

@Jeff-P
Copy link

Jeff-P commented Mar 6, 2016

Im still having an issue while using the jquery version. Anybody do any hacks to fix it there on file dist/jquery.formatter.min.js

@Jeff-P
Copy link

Jeff-P commented Mar 6, 2016

I used this script to get around it <script type="text/javascript"> $( document ).ready(function() { window.scrollTo(0,0); }); </script>

@chrislebaron
Copy link

The change @smaury made is the fix! At one point I had tried using @Jeff-P's solution, but it's more of a hack, and changes the scroll position for a user if they refresh the page.

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

8 participants