If one hides the sidebar and applies all the styling override that kiosk-modes applies, the logic to remove all the inert blockers from the screen and to set all the elements in a closed state is never executed. This is not a problem for those that set hide_sidebar globally in all the dashboards, but it is a problem if someone wants a dashboard without sidebar and navigates to it from a dashboard with it enabled, because in that moment the logic to close the sidebar is executed and as the sidebar never closes this provokes that it is impossible to interact with the interface.
In this pull request a small fix has been introduced. Before hiding the sidebar, we are checking if the type of the mc-drawer element is modal (it occurs in mobile) and if its appContent has the inert property set in true (in those cases it is impossible to interact with the screen). If that is the case, then we wait for the MDCDrawer:closed event of the Navigation Drawer, and only after it is fired, we apply the styles to hide the sidebar. In the rest of the cases we hide the sidebar directly without waiting for this event.
When one opens and closes the sidebar, there is a logic behind to manage the Navigation Drawer and its focus trap.
If one hides the sidebar and applies all the styling override that
kiosk-modes
applies, the logic to remove all the inert blockers from the screen and to set all the elements in a closed state is never executed. This is not a problem for those that sethide_sidebar
globally in all the dashboards, but it is a problem if someone wants a dashboard without sidebar and navigates to it from a dashboard with it enabled, because in that moment the logic to close the sidebar is executed and as the sidebar never closes this provokes that it is impossible to interact with the interface.In this pull request a small fix has been introduced. Before hiding the sidebar, we are checking if the
type
of themc-drawer
element ismodal
(it occurs in mobile) and if itsappContent
has theinert
property set intrue
(in those cases it is impossible to interact with the screen). If that is the case, then we wait for the MDCDrawer:closed event of the Navigation Drawer, and only after it is fired, we apply the styles to hide the sidebar. In the rest of the cases we hide the sidebar directly without waiting for this event.Closes #275