mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 09:43:30 +00:00
Set URL fragment when recovering auto-save on mobile
This triggers Toggler.js in MF to open the section, which may not be stored in sessionStorage, as DT can recover from localStorage. Bug: T338920 Change-Id: I695e2d423b5159ef4cdcefc0f4d4d0a05f46879b
This commit is contained in:
parent
98a7afe26e
commit
8a8c7270cf
|
@ -480,6 +480,11 @@ function init( $container, state ) {
|
|||
mode = storage.get( 'reply/' + comment.id + '/mode' );
|
||||
$link = $( commentNodes[ i ] );
|
||||
setupController( comment, $link, mode, true, !state.firstLoad );
|
||||
if ( OO.ui.isMobile() ) {
|
||||
var urlFragment = mw.util.escapeIdForLink( comment.id );
|
||||
// Force the section to expand on mobile (T338920)
|
||||
location.hash = '#' + urlFragment;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue