ProjectEvergreen / greenwood

Greenwood is your workbench for the web, embracing web standards from the ground up to empower your stack from front to back.
https://www.greenwoodjs.io
MIT License
96 stars 9 forks source link

static router not working on Chrome / Edge browsers (anymore) #1068

Closed thescientist13 closed 1 year ago

thescientist13 commented 1 year ago

Type of Change

Bug

Summary

Meant to open this a little while ago, but it seems as of the latest version of Chrome (109) the technique we use for Chromium browser based event delegation isn't working anymore.

For example, if you go to the About page, and then go the Docs page, you can see the docs site is doing a full page reload. Screen Shot 2023-02-15 at 9 24 27 PM Screen Shot 2023-02-15 at 9 24 17 PM

Still working in Firefox though! 😅 🦊

Details

So doing some logging in the browser, I am definitely not seeing path in the logged event object, so that obviously explains why its not working anymore.

Screen Shot 2023-02-15 at 6 38 47 PM

I suppose this puts Chrome in the same situation as Safari now without access to path or originalTarget` (Firefox) so not sure if this means we have to figure out #559 right now then?

Will see if there is a quick win here though, or maybe a slight tweak to our event delegation implementation?

I suppose this is worth a shout to anyone reading this who might be interested in helping with #560 🙏

thescientist13 commented 1 year ago

This StackOverflow thread covers the exact issue in question I think, with some of the comments to the top level reply calling out similar techniques in our current router implementation.

I suppose this may just be an issue with closed shadow roots in general maybe? It seems a lot to open all ShadowRoots just for classic event delegation? 🤔