Open Sad-Soul-Eater opened 2 years ago
Thanks for your feedback, i will investigate it after next release https://github.com/translate-tools/linguist/milestone/4
I've tested a Linguist on mobile devices and it works fine, but as i see you use not usual OS and device, is it possible that touch events on your device works different of another android phones?
Is you have problems like this with another web sites?
Never had problems like this with other websites or extensions, also I noticed one interesting thing: on other sites drop-down menus open a dialog window with a list of items from the menu instead of a regular drop-down like in desktop browsers, but in your extension drop-down opens always as a regular drop-down.
I tested react-elegant-ui/demo on my phone and the 'select' component does not open, even in chrome 👀
If that could be helpful - I found demo and the dropdown list in it works as expected
@Sad-Soul-Eater you've dig deep, thanks. I though about UI kit too, but maybe problem even deeper, in adobe library that handle clicks and touches (react hook usePress
) https://github.com/adobe/react-spectrum
I need your help to fix this bug. Could you please check the page https://react-spectrum.adobe.com/react-aria/usePress.html Try to press on button there, make screenshot of events log and attach to this issue
Maybe they fixed this bug and we may just update library.
(optionally) Also, if you can, you may try to:
npm i && npm i @react-aria/interactions@latest
examples/components-list
of projectnpm run build
index.html
in browser and try to touch selects and buttonsIf it will works fine, then problem in thirdparty library and i will update this library to fix this bug
Test results of react-spectrum.adobe.com/react-aria/usePress.html:
Also, I failed to build vitonsky/react-elegant-ui with this errors:
Building in node:14 docker container
' is not assignable to parameter of type 'string | FunctionComponent<{}> | ComponentClass<{}, any>'. Type 'ComponentClass
' is not assignable to type 'string | FunctionComponent<{}> | ComponentClass<{}, any>'. Type 'ComponentClass
' is not assignable to type 'ComponentClass<{}, any>'. Types of property 'getDerivedStateFromProps' are incompatible. Type 'GetDerivedStateFromProps
| undefined' is not assignable to type 'GetDerivedStateFromProps<{}, any> | undefined'. Type 'GetDerivedStateFromProps
' is not assignable to type 'GetDerivedStateFromProps<{}, any>'. Types of parameters 'nextProps' and 'nextProps' are incompatible. Type 'Readonly<{}>' is not assignable to type 'Readonly
'. ts-loader-default_060516610f7976e1 @ ../../src/components/Select/Select.bundle/desktop.ts 1:0-47 15:162-174 @ ./src/index.tsx 22:0-78 50:32-38 webpack 5.74.0 compiled with 9 errors in 405 ms ```
I will fix TS compiler errors and we should try it again later.
As i see on screenshot, your pointer type name is virtual
that is unusual and i can't found info about it. I will investigate, stay tune
I run this code on codesandbox.io on my mobile, and in the console that reports touch
window.addEventListener("pointerdown", detectInputType);
function detectInputType(event) {
console.log(event.pointerType)
}
Also if this could be useful, I found this: https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria/utils/src/isVirtualEvent.ts Seems there is something about android and virtual pointer/click events ~// Idk have no experience with js 😅~
I found the problem cause
virtual
value set here: https://github.com/adobe/react-spectrum/blob/1b4d3af728d7eed74834601cc796ffb4ecd89966/packages/%40react-aria/interactions/src/usePress.ts#L321-L324
And here we ignore virtual
touches https://github.com/vitonsky/react-elegant-ui/blob/4120f51caf356e44502404104fc6ddcddc163471/src/components/Select/Select%40desktop.tsx#L188
It looks as problem with react-aria library, i have plans to replace it to my own implementation UI primitives.
As temporary solution i have to consider remove code to ignore virtual events. This fix is require a tests on UI library side to prevent breaking changes
Faced the same problem on android. It may be useful:
When connecting a mouse via USB OTG menu works and clicks without problems, does not respond only to the touchscreen.
It seems to have already solved the problem https://github.com/nextui-org/nextui/issues/1349 and https://react-spectrum.adobe.com/releases/2023-09-07.html
@LynxPDA sounds good! I will investigate this problem. What phone model, operation system and browser you use?
I tried to reproduce on Realme 8 Android 12, i cannot to reproduce it stable, but i got this problem few times one year ago
@vitonsky
Xiaomi Mi 10T
Android 12 SKQ1.211006.001
MIUI Global 14.0.1
Firefox Nightly 123.0a1
All drop-down menus in the extension UI don't respond to touch inputs, but when I connected mouse to my phone I was able to edit settings in drop-down menus.
Browser: Firefox Nightly 107.0a1 and Fennec F-Droid 105.1.0 Extension: 4.0.3 OS: SparkOS 13.1 (Android 13) Device: POCO F2 Pro
I really like your extension and this is only one feature that I miss in firefox on mobile in comparison to chrome, I'll be very thankful if you have free time to fix the issue.
https://user-images.githubusercontent.com/20245745/195457632-296d6421-0ca1-4b64-88f2-2960bf90a0f4.mp4