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

Not marking as dirty if autofocused element is changed #50

Closed
jk3us opened this issue Jun 7, 2013 · 4 comments
Closed

Not marking as dirty if autofocused element is changed #50

jk3us opened this issue Jun 7, 2013 · 4 comments

Comments

@jk3us
Copy link

jk3us commented Jun 7, 2013

I have a form (loaded via ajax, not sure if that is related) where I auto-focus the first field. If I type something in that field, the reload the page, it doesn't get flagged as dirty. If I click out of and into that field and change it it's fine. Likewise, if I tab to the next field, ctrl+tab back and type something it gets marked as dirty.

@jk3us
Copy link
Author

jk3us commented Jun 7, 2013

Edit: if I "setClean" before focusing on the first field it seems to work. Not intuitive. I'll leave it up to you to close or fix.

@snikch
Copy link
Owner

snikch commented Jun 8, 2013

That's odd. I'll have a look at it at some point and see if it can be handled automatically.

Cheers

@0lukasz0
Copy link

I got a hack for this:

    $(function() {
        var $focused = $("*:focus");
        $focused.blur();
        $focused.focus();
     });

@marceltschoppch
Copy link

Added pull request #73 to fix this problem.

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

4 participants