This topic has 3 replies, 2 voices, and was last updated 9 years by adasin.

  • Author

    Tagged: 

  • #44214
     adasin
    Participant

    I have a few questions regarding offcanvas and hope this might resonnate with others or the design team for consideration:

    1) How can I change the responsible JS to make sure that Offcanvas panel remains open (after it has been triggered open) i.e. does not close when not in focus. This way whatever is in the content remains available to the user until the user decides to close the panel. As it is now one needs to re-open offcanvas panel (sometimes over and over) as soon the focus shifts to another area – kind of silly I believe.

    2) Is it possible to get rid of the annoying rotating x and replace it with some text, [close this panel] perhaps? I know the relavant part is in app.css but drastically removing that section doeson’t seem to make any difference – but even so how to replace it within app.css with some text?

    Many thanks.

    #44219
     sharmstr
    Moderator

    1 – Line 1425 of app.js closes it when clicking anywhere else on the page. You can comment that line out. But, apps.js is minified. So you’ll have to re-minify the file and save to apps.min.js. Keep in mind however, that you’ll have to do this after every upgrade.

    2 – You can use this css selector. Edit and style to suit your needs.

    COPY CODE
    
    .wrap-canvas-menu .offcanvas-title .open-sidebar:before {
    content: "[close this panel]";
    }
    
    .wrap-canvas-menu .offcanvas-title .open-sidebar:hover:before {
    -webkit-transform: none;
    transform: none;
    }
    

    Put it in either your child style.css file or quick css located in theme options. There’s no need to edit core files. Plus, you were trying to edit apps.css, but its minified and apps.min.css is actually the file being loaded.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #44259
     adasin
    Participant

    Thank you very much @sharmstr once again for all your help. All good now with the tweak. Hope Kleo team takes note of my observation and considers to provide a user option for the auto close feature.

    Just a note of caution for the uninitiated – minifying must be taken with care as it could bring the site down if not done properly.

    Btw for those interested the referred line in the apps.js is:
    // $(‘.offcanvas-sidebar’).removeClass(‘is-open’);
    which in my file was line 1427.

    #44263
     adasin
    Participant

    An after-thought:
    Even with the tweak provided as soon one navigates away from the page it closes. It would be great if the offcanvas panel could persist when moving around the site until user decides to close it, that way it could serv as an on-demand sidebar – not sure if this is technically possible at all though. Just food for thought!

Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?