Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popup Currently Not Working on Android #185

Open
rsimon opened this issue Dec 16, 2024 · 4 comments
Open

Popup Currently Not Working on Android #185

rsimon opened this issue Dec 16, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@rsimon
Copy link
Member

rsimon commented Dec 16, 2024

Hm... looks like the popup from the @recogito/react-text-annotator package is currently not working on Android. (Seems to work ok on desktop + iOS.)

@rsimon rsimon added the bug Something isn't working label Dec 16, 2024
@oleksandr-danylchenko
Copy link
Contributor

oleksandr-danylchenko commented Dec 16, 2024

Yeah, I can reproduce it locally 👀
However, it appears when I click on an existing annotation.

@oleksandr-danylchenko
Copy link
Contributor

Yeah, on creation the bounds are undefined for the annotation 🤔
image

useEffect(() => {
if (annotation?.id) {
const bounds = r?.state.store.getAnnotationBounds(annotation.id);
setOpen(Boolean(bounds));

@oleksandr-danylchenko
Copy link
Contributor

I think it went unnoticed in my app, as I also added the "idling" check before showing the popup - #174. So it gives enough time for the bounds to get populated before we query them.

@oleksandr-danylchenko
Copy link
Contributor

Another interesting fact is that the created and selectionchange events fire before the useEffect for the popup 👀
image
But here's how it looks on Mac:
image

oleksandr-danylchenko added a commit to oleksandr-danylchenko/text-annotator-js that referenced this issue Dec 16, 2024
…candidate

# Conflicts:
#	packages/text-annotator-react/src/TextAnnotationPopup/TextAnnotationPopup.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants