magesuite / theme-creativeshop

Open Software License 3.0
38 stars 22 forks source link

Fix marking current level in `offcanvas-navigation` #9

Closed jtomaszewski closed 4 years ago

jtomaszewski commented 4 years ago

This fixes two bugs:

  1. https://github.com/magesuite/theme-creativeshop/commit/924575e5fcb8d4f813401046e3364f22b5cc36c7 :

    • now: go on a homepage (where there is no active category). open offcanvas. (it'll be ok now) close it. open again. result: the root level is not set as current (and thus, scrolling in the offcanvas is impossible, which causes trouble especially on smaller mobile devices)
    • after: everything's ok
  2. https://github.com/magesuite/theme-creativeshop/commit/840416db5a06f78dcc92c19a692715fd9064344b

    • now: if you very quickly open and close offcanvas, (while it is still loading), it will trigger a JS error upon closing
    • after: everything's ok.

Tested on our shop, should be good.