Incorrect focus when 'persistent': true #86

Open
RaduGrama opened this Issue Jul 10, 2015 · 9 comments

Projects

None yet

8 participants

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.

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

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

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

smaury commented Feb 19, 2016

Just made a pull request about this issue:
#94

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 commented Mar 6, 2016

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

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.

Jeff-P commented Mar 28, 2016

@chrislebaron Just tried to share what worked for me, Good for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment