#15141 closed bug (notabug)
tooltip not open on change event
Reported by: | raszagar | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.tooltip | Version: | 1.12.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When input change event fired don't show tooltip.
View code: http://codepen.io/raszagar/pen/oZbjXL
<input id="input"> <script> function showTooltip(){ $('#input').attr("title", "Test"); $('#input').tooltip("open"); //It don't open } $(document).ready(function() { $('#input').tooltip(); $("#input").on('change', function () { showTooltip(); }); }); </script>
Note: See
TracTickets for help on using
tickets.
That's because you're getting the change event at the time of blur and blurring an input will close the tooltip. This should help show you what's happening: http://codepen.io/anon/pen/PpZEjg
If you want to show the tooltip on change, you should use a timeout: http://codepen.io/anon/pen/BWjJdX