infi-pc / locatorjs

https://www.locatorjs.com
1.43k stars 68 forks source link

bug: extension prevents triggering onClick events (Shoelace components) #82

Closed J0ne closed 1 year ago

J0ne commented 1 year ago

Where the bug happens

your browser

Chrome 107.0.5304.121

Describe the bug

I use Shoelace components both the custom elements and React components. When I had LocatorJS active, Shoelace buttons (and other onClick events) stopped working.

After removing / disabling the extension, code worked.

To reproduce

install shoelace: npm install @shoelace-style/shoelace

import { SlButton, SlDialog } from '@shoelace-style/shoelace/dist/react';

And in the app <SlButton onClick={() => alert("Doesn't show up!")}>Test</SlButton>

Additional information

No response

infi-pc commented 1 year ago

I could not replicate that Locator would prevent Shoelace onClick from working, but going to components does not work for me either.

Tested on this project: https://codesandbox.io/s/sleepy-feistel-zzbbh2

I see there are at least two problems

  1. it does not find the correct source (it might be because of codesandbox, but I was not able to run Shoelace it on Vite or NextJS locally 🤷)
  2. onClick on Shoelace component triggers before the trigger in Locator even when with "option" modifier

https://user-images.githubusercontent.com/2264725/204522442-b59efdbb-45df-47f6-9e85-d1b426344e16.mp4

I don't currently don't have time to investigate further, might check it later; I will welcome any PR

J0ne commented 1 year ago

Ok, thanks. This is not a showstopper by any means. I'll close this.