Okay
  Public Ticket #2428468
sidebar-collapsed class does not operate correctly on small screens
Closed

Comments

  • redletterdig started the conversation

    As per :
    <div class="page-container sidebar-collapsed"><!-- add class "sidebar-collapsed" to close sidebar by default, "chat-visible" to make chat appear always -->


    A page should open with the sidebar collapsed, which it does.  However when the page is opened on a mobile / tablet device, the sidebar is collapsed - a behavior which breaks the menu system (see attached screenshot).  On a resize of the window (if possible), the sidebar-collapsed class is removed (as a result of resizable.js??) but on a load of the page the menu is broken.

    Should an $(function() { ... }); call be used to run resizable?  Curious what the correct solution is? Thanks.



  • redletterdig replied

    Added: 

    // Fire resizable to properly calibrate main menu collapse trigger_resizable()


    to line 26 of neon-custom.js, just after the public_vars definitions. Seems to work well by firing a resizable event on page load.  Can't think of any errors with this approach.  Will it effect future menu collapses if window resized?


  • [deleted] replied

    Hi redletterdig,

    Sorry for delay of response, as I wasn't in the office and other team members couldn't help you with this question.

    Yes, you are free to edit the code to your needs and modifying neon-custom.js is ok, simply comment the code you changed for future reference and in case you update or replicate your work. 

    That event attached on "resizable" was for functionality and you decide how it works on your side as well.