Search and Top Navigation
#9364 closed bug (fixed)
Opened June 07, 2013 12:15PM UTC
Closed October 02, 2013 03:02PM UTC
Last modified October 07, 2013 02:30PM UTC
Dialog: Click of element with tooltip scrolls the dialog to the top
Reported by: | thojon | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.11.0 |
Component: | ui.dialog | Version: | 1.10.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
See this fiddle:
Clicking the link at the bottom in the dialog works the first time (in my case, a div is toggled) but after the first time it doesn't work, the scrollbar moves to top and nothing happens. The scenario only arises when you have tooltip on ths js-link and you have a link at top of the page and that the js link you click is not shown from start, eg you have to scroll down to click it.
It works correctly in jquery ui 1.9.2
Attachments (0)
Change History (8)
Changed June 08, 2013 02:04AM UTC by comment:1
component: | ui.core → ui.dialog |
---|---|
status: | new → open |
summary: | Tooltip on js link in dialog messes up js call → Dialog: Click of element with tooltip scrolls the dialog to the top |
Changed July 25, 2013 12:03PM UTC by comment:2
The problem is in the function '_moveToTop'.
For some reason it runs on each click inside a dialog. If it finds any visible elements behind the dialog, it moves them above the dialog and scrolls the dialog to top. But the tooltip is simply added to the body right after the dialog and it is visible when you click on the element with it.
For me, the issues is fixed by preventing the _moveToTop function launching for tooltips. But I think it will not help if some custom tooltips or elements will be added.
Changed September 24, 2013 07:07AM UTC by comment:3
I encountered the same problem. Can you dirty fix this by overriding _moveToTop of the Dialog like this:
_moveToTop: function (event, silent) {
var moved = !!this.uiDialog.nextAll(":visible:not(.ui-tooltip)").insertBefore( this.uiDialog ).length;
if ( moved && !silent ) {
this._trigger( "focus", event );
}
return moved;
}
I added :not(.ui-tooltip) to the selector, so _moveToTop doens't consider tooltips as other dialogs.
Changed September 30, 2013 11:56AM UTC by comment:4
Just tested this with my fix for #9166 in place (see https://github.com/jquery/jquery-ui/pull/1090). It works as intended, since the DOM shuffling is gone. Can this be considered a duplicate of #9166? The underlying issue is the same, even if the symptoms are different.
Changed September 30, 2013 12:33PM UTC by comment:5
I think this is sufficiently different enough to not close a duplicate. But it should be closed by that PR, so let's update the commit message before landing.
Changed October 02, 2013 03:02PM UTC by comment:6
resolution: | → fixed |
---|---|
status: | open → closed |
Changed October 02, 2013 03:06PM UTC by comment:7
milestone: | none → 1.11.0 |
---|
I'm still not exactly sure what's going on here but I could recreate the problem. Reduced: http://jsfiddle.net/tj_vantoll/WWraV/
Not only is a click event not occurring on the tooltip, click events seem to be completely suppressed.
never fires.