Currently it is unlikely the section is collapsed, as it would have just been opened by the user and that state is preserved in sessionStorage. As we move to localStorage, it will become more likely that a user opens a page where a draft comment is recovered, but there section is not restored because sessionStorage is erased when the tab is closed.
This means DiscussionTools will need to ensure the section is forced open. Currently the only API for getting MobileFrontend to open a section is to set the URL has to the ID of the section, or an ID inside the section. We could do this here but it might result in some scroll jumping. Alternatively we could expose a JS API for expanding sections.
Testing
- Expand a section on a mobile talk page and open the reply widget.
- Start typing a reply
- Collapse the section the reply is in.
- Reload the page
Observed
- A notification is shown saying your changes have been recovered, but the section is not expanded so no reply widget is visible
Expected
- The reply widget with your draft comment is visible.