Closed eltimn closed 6 years ago
Thanks for the report @eltimn. This looks like a bug in Marko. Will investigate.
Yes is a error in marko in the event-delegation component. The bug was added in version v4.5.0-beta.0
, in v4.4.28
works well. But I didn't found how to fix that I think is in components/util-browser
in the method of attachBubblingEvent
.
@austinkelleher Will you be publishing the fix?
Hello. I'm facing a similar and possibly related issue. Adding this here to provide context to help anyone looking at this.
Binding an event using on-click throws an error in a component if the component is split component but works as expected if it not split.
Have created a MVP Express + Lasso + Marko app which reproduces this for illustration: https://github.com/cravindra/marko-error-sample
Using @jlopezxs suggestion to downgrade to 4.4.28
worked but that made other features like using *:scoped
on attributes stop working.
Dependencies as featured in package.json:
{
"express": "^4.16.2",
"lasso": "^2.11.20",
"lasso-marko": "^2.3.1",
"marko": "^4.5.5"
}
Stack Trace on the Browser:
template-3e4cf51f.js:1702 Uncaught TypeError: Cannot read property '0' of null
at delegateEvent (template-3e4cf51f.js:1702)
at HTMLBodyElement.<anonymous> (template-3e4cf51f.js:1755)
Update:
Tried 4.5.0
it works as expected there but the *:scoped
feature stops working.
Tried 4.5.1
and it breaks there but *:scoped
feature works
Published marko@4.5.6
with a fix. Let us know if you see any other issues.
Also markojs.com on mobile is also fixed.
v4.5.6
works as expected. Thanks for the quick fix @austinkelleher
Excellent. Thanks.
There's a JavaScript error on the docs site when clicking on the menu dropdown (hamburger icon) when viewed on small screens: