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

Web view does not always properly register message handler on moving web view - useEventAsync doesn't properly unsubscribe in some conditions #1303

Open
tjcouch-sil opened this issue Nov 13, 2024 · 1 comment · May be fixed by #1406
Assignees
Labels
bug Something isn't working

Comments

@tjcouch-sil
Copy link
Member

tjcouch-sil commented Nov 13, 2024

Describe the bug
When you move a web view from one location to another by dragging it around, sometimes, it will reload. When it reloads, there is a chance it does not properly unregister and register the message handler (created in #1185), so it does not always successfully receive postMessageToWebView messages.

To Reproduce
Steps to reproduce the behavior:

  1. Set the DEV_NOISY environment variable to true and run Platform.Bible
  2. Open a Hello World Project Web View
  3. Open a viewer web view for the project web view
  4. Move the project web view somewhere else in the dock layout. Now, sometimes, when you click buttons on the viewer web view, you will notice that it does not properly set the highlighted name. Then repeat 4 again and see it may work or not work again.

Expected behavior
The messages are always properly passed as the handler is always properly set up.

@tjcouch-sil
Copy link
Member Author

tjcouch-sil commented Nov 13, 2024

Possibly same problem as #597 - see if that is fixed as well

@katherinejensen00 katherinejensen00 moved this to 🎬 Product Backlog in Paranext Nov 13, 2024
@katherinejensen00 katherinejensen00 moved this from 🎬 Product Backlog to 📥 For Consideration in Paranext Nov 13, 2024
@CraigNisbett CraigNisbett moved this from 📥 For Consideration to 🎬 Product Backlog in Paranext Nov 15, 2024
@katherinejensen00 katherinejensen00 moved this from 🎬 Product Backlog to 🔖 ToDo in Paranext Dec 11, 2024
@lyonsil lyonsil self-assigned this Dec 13, 2024
@lyonsil lyonsil moved this from 🔖 ToDo to 🏗 In progress in Paranext Dec 13, 2024
@lyonsil lyonsil moved this from 🏗 In progress to 👀 In review in Paranext Dec 18, 2024
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
Status: 👀 In review
Development

Successfully merging a pull request may close this issue.

3 participants