muk-it / muk_web

MuK Odoo Web Modules
GNU Lesser General Public License v3.0
109 stars 232 forks source link

[12.0] Uncaught TypeError: Cannot read property 'left' of undefined #82

Closed gaikaz closed 5 years ago

gaikaz commented 5 years ago

Full error:

Error:
Uncaught TypeError: Cannot read property 'left' of undefined

example.com/muk_web_utils/static/libs/simplebar/simplebar.js:4015
Traceback:
TypeError: Cannot read property 'left' of undefined
    at SimpleBar.isWithinBounds (example.com/muk_web_utils/static/libs/simplebar/simplebar.js:4015:36)
    at HTMLDivElement.SimpleBar.onPointerEvent (example.com/muk_web_utils/static/libs/simplebar/simplebar.js:3535:35)

Easiest way to reproduce is to use Chrome browser's DevTools with device toolbar toggled on with Pixel 2 XL on a landscape mode. Like so: image

It seems to effect only touch devices that are wide enough to see the small type (no labels) of sidebar menu. The error happens on click of any sidebar menu item.

Module muk_web_utils seems to be using a third party library, I checked their repository for this issue and it looks like it existed and has already been closed: https://github.com/Grsmto/simplebar/issues/247

I would guess that the module simply needs an updated version of this sidebar library.

keshrath commented 5 years ago

https://github.com/muk-it/muk_web/commit/7d7cbf56dcfaeb785279800961c9e35fdd3a74c8

gaikaz commented 5 years ago

Thank you, this seem to have fixed it as I can't reproduce the issue anymore.