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:
Set the DEV_NOISY environment variable to true and run Platform.Bible
Open a Hello World Project Web View
Open a viewer web view for the project web view
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.
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:
DEV_NOISY
environment variable totrue
and run Platform.BibleExpected behavior The messages are always properly passed as the handler is always properly set up.