Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#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>

Change History (2)

comment:1 Changed 2 years ago by Scott González

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

comment:2 Changed 2 years ago by raszagar

Thank you!

Note: See TracTickets for help on using tickets.