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

Close widget when tab out of enhanced input field #369

Open
bkdotcom opened this issue Jun 8, 2017 · 0 comments
Open

Close widget when tab out of enhanced input field #369

bkdotcom opened this issue Jun 8, 2017 · 0 comments

Comments

@bkdotcom
Copy link

bkdotcom commented Jun 8, 2017

#307 closes the widget when you tab out of the widget.. but it doesn't close the widget when you tab out of the original input field...

  1. focus input field
  2. widget opens
  3. blur the input field (or tab away)
  4. widget is still open... but user is now on unrelated field.
/*
  This will not work..    
  the very act of clicking the widget will blur the input and close the widget
*/
$("#myInput").on("blur", function(){
    $(this).timepicker("hideWidget)"
});

tried work arounds such as listening for click on widget, but timepicker code contains stopPropagation

My super janky work-around is to listen for focus on surrounding inputs and close the widget

https://stackoverflow.com/questions/33164304/auto-close-bootstrap-timepicker/44443769#44443769

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

1 participant