Skip to content

trigger error if popup is closed prematurely#135

Merged
bhousel merged 1 commit intoosmlab:mainfrom
tyrasd:popup-closed-watcher
Jan 17, 2025
Merged

trigger error if popup is closed prematurely#135
bhousel merged 1 commit intoosmlab:mainfrom
tyrasd:popup-closed-watcher

Conversation

@tyrasd
Copy link
Copy Markdown
Member

@tyrasd tyrasd commented Jan 14, 2025

Currently, consumer applications don't get notified when the login process is aborted by closing the login popup window, causing these applications being stuck in a waiting for login to complete state. As the login popup is often on a different domain than the application, there only way to find out that the popup was closed prematurely is by adding a watchdog loop which periodically checks if window is still open.

Fixes openstreetmap/iD#10651

as the popup is typically operating on a cross origin domain, the only reliable way to check the status of the popup is to regularly poll its `closed` status. see https://stackoverflow.com/a/78372804/1627467
@bhousel bhousel merged commit ed355ec into osmlab:main Jan 17, 2025
@tyrasd tyrasd deleted the popup-closed-watcher branch July 14, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Canceling Login Window after Save Freezes Map and Disables Editing

2 participants