Opened 4 years ago

Closed 4 years ago

#15278 closed bug (notabug)

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.

Change History (2)

comment:1 Changed 4 years ago by ryannz

Anybody could help with this one please?

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

Component: ui.coreui.dialog
Resolution: notabug
Status: newclosed

This is intended behavior for accessibility.

Note: See TracTickets for help on using tickets.