Skip to main content

Search and Top Navigation

#15141 closed bug (notabug)

Opened March 01, 2017 12:46PM UTC

Closed March 01, 2017 09:59PM UTC

Last modified March 02, 2017 11:04PM UTC

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>
Attachments (0)
Change History (2)

Changed March 01, 2017 09:59PM UTC by scottgonzalez comment:1

resolution: → notabug
status: newclosed

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

Changed March 02, 2017 11:04PM UTC by raszagar comment:2

Thank you!