When using the default top header in WebViewer, I click the Menu button and then select the Settings menu option. When the settingsModal becomes visible in the UI, it does not trigger a visibilityChanged event.
However, closing the settingsModaldoes trigger a visibilityChanged event as expected.
As a temporary workaround, I’m detecting whether the settingsModal is present shortly after a visibilityChanged event where MainMenuFlyout is no longer visible (which indicates the user clicked a menu option or navigated away).
Please consider updating the behavior so that visibilityChanged is also triggered when the settingsModal becomes visible.
Hello, I’m AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
It appears that you are experiencing an issue where the visibilityChanged event does not trigger when the settingsModal becomes visible. This might be due to how the event system is currently implemented in the WebViewer UI. Your workaround of detecting the presence of the settingsModal after the MainMenuFlyout visibility changes is a practical approach in the interim.
Some things you can try:
Check if there are any custom event listeners that might be interfering with the default visibilityChanged behavior.
Consider using a MutationObserver to detect changes in the DOM related to the settingsModal visibility.
Review the WebViewer API to see if there are other events or hooks that can be leveraged for your specific use case.
Here are some resources that might help you:
Using the WebViewer API: This guide can help you understand how to leverage the WebViewer API for custom implementations.
Integrating TypeScript with WebViewer: If you’re using TypeScript, this resource can assist in setting up your environment for better code management.
Containers Modular Header: Learn more about how the modular UI components work, which might give insights into handling events.
Migrating to V7 of WebViewer: This guide provides information on changes in newer versions that might affect event handling.
Hopefully, this helps you solve your problem while you wait for a human to get back to you.
I was not able to reproduce the issue you are reporting.
Could you indicate the version of WebViewer you are using?
Are you able to reproduce this issue on the Showcase?
If you are, could you provide code snippets/screen recording to show us what we are doing differently from you?
Thanks for getting back to me. We are using version 11.2.0.
I see there is a v11.4.0 available, I will upgrade and try reproducing this issue before providing a code snippet or screen recording.