turbine icon indicating copy to clipboard operation
turbine copied to clipboard

Lists not working in some browsers

Open stevekrouse opened this issue 3 years ago • 5 comments

While it works in Chrome on my Linux machine, it does not work on Chrome on mobile or Firebox or Chromium on Linux.

import { runComponent, elements as E } from "@funkia/turbine";

// Also fails: runComponent("#mount", E.div(["hi"]));
runComponent("#mount", ["hi"]);

Codesandbox: https://codesandbox.io/s/determined-water-oqv6o?file=/src/index.ts

Error:

Screenshot from 2021-09-08 11-42-08

stevekrouse avatar Sep 08 '21 10:09 stevekrouse

The problem happens on the codesandboxes in the readme on mobile. For example: https://codesandbox.io/s/xenodochial-williams-xok6q

stevekrouse avatar Sep 08 '21 10:09 stevekrouse

The issue is related to a bug in isBehavior from hareactive. See https://github.com/funkia/hareactive/pull/97.

My guess why it still works on your linux machine, is because the chrome version is older than 92, where they introduced a new method on arrays which causes the issue.

limemloh avatar Sep 09 '21 19:09 limemloh

Ah amazing! Glad you have a fix almost ready. When do you expect it to land? Or do you have a suggested workaround?

stevekrouse avatar Sep 09 '21 20:09 stevekrouse

I'm working on getting a development environment setup so I can make this fix myself but I'm unable to find a way to get npm to use my local version of hareactive/turbine instead of that from the npm registry. Am I missing a build step or something?

Ideally, I want it to auto-reload changes from these dependencies on save, if possible. How do you advise a setting up development environment for hacking on hareactive and turbine?

For context, I'm working on gitpod.io instead of locally -- if that helps. (Easier to collaborate)

stevekrouse avatar Sep 10 '21 08:09 stevekrouse

After a 2 hours I was able to get local dependencies working! The issue was that I was on node v14.18.3 which seems to require turbine/node_modules/hareactive/dom/package.json to exist, which it does in the npm package but not when you build it locally. I was able to fix the issue by either downgrading node to v12.18.3 or by adding that file to the symlinked hareactive directory. This should probably be its own github issue under hareactive or turbine (if it isn't already), yes?

stevekrouse avatar Sep 10 '21 10:09 stevekrouse