I came here because I had a similar issue. In my case it was happening in Chrome (53.0.2785.143 m, Windows) and was triggered when clicking a button placed inside the title bar, causing a jump when the page, with its dialog, was scrolled down some (or several) pixels from the top, placing it again to the top of the window, and not triggering what the button was supposed to do.
After some investigation, mainly with the help of Chrome js debugger itself, I found an event listener on ui-dialog-titlebar
, which corresponds to the dialog title bar, and whas triggered with the mousedown
event (more info on circa line 9161, file jquery-ui.js
, jQuery UI v1.9.2; probably it is solved in more recent versions). After that it was clear that removing the handler would solve the problem, which I did on the open
event in the dialog initialization code:
$(".selector").dialog({
open: function(event,ui){
$(this).parent().find('.ui-dialog-titlebar').unbind('mousedown');
}
})
Note that this will probably interfere in case you have some dragging action related to the title bar, though.