Search and Top Navigation
#15278 closed bug (notabug)
Opened March 07, 2018 08:38PM UTC
Closed October 25, 2018 01:43PM UTC
stop jQuery UI dialogue box scroll top when close
Reported by: | ryannz | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.dialog | Version: | 1.12.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I have this problem that when I close jQuery UI dialog, the window keeps scrolling to top but I just want my window to stay in the same position. Please have a look at this clip
https://www.screencast.com/t/lhawhmVpiG
After going through the close function in the library, I notice this is the part of the code that trigger the scrolling (please correct me if I am wrong).
if ( !this.opener.filter( ":focusable" ).trigger( "focus" ).length ) { // Hiding a focused element doesn't trigger blur in WebKit // so in case we have nothing to focus on, explicitly blur the active element // https://bugs.webkit.org/show_bug.cgi?id=47182 $.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) ); }
Is there a way I can fix that without modifying the library? thanks.
Anybody could help with this one please?