mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 17:51:09 +00:00
Fix collapsed sections when recovering autosave on mobile, take 2
Follow-up to 8a8c7270cf
.
I think this wasn't working becase we were doing it in the wrong
order (reply tool initialization would disable toggling section
state before toggler toggled it open).
Bug: T338920
Change-Id: I7ed3d5c149ddb3d33cb67010f032c63e175687f2
This commit is contained in:
parent
9f650c92ee
commit
3957d7ac25
|
@ -489,12 +489,12 @@ function init( $container, state ) {
|
|||
if ( storage.get( 'saveable' ) ) {
|
||||
mode = storage.get( 'mode' );
|
||||
$link = $( commentNodes[ i ] );
|
||||
setupController( comment, $link, mode, true, !state.firstLoad, storage );
|
||||
if ( OO.ui.isMobile() ) {
|
||||
var urlFragment = mw.util.escapeIdForLink( comment.id );
|
||||
// Force the section to expand on mobile (T338920)
|
||||
location.hash = '#' + urlFragment;
|
||||
}
|
||||
setupController( comment, $link, mode, true, !state.firstLoad, storage );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue