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

Fix popout widget issue when useDefaultPopoutUrl is not used #1179

Merged
merged 5 commits into from
Jan 17, 2025

Conversation

GerardasB
Copy link
Collaborator

@GerardasB GerardasB commented Jan 16, 2025

Changes

This PR fixes #1178 by replacing deprecated document.write() with DOM manipulation methods.

Popout widget would not close correctly, due to pagehide listener not being called. See https://developer.mozilla.org/en-US/docs/Web/API/Document/open#notes
I.e. using document.close() (after writing to the document) and then adding the pagehide listener seems to work correctly as well.

Testing

N/A

@GerardasB GerardasB requested a review from a team as a code owner January 16, 2025 22:34
@GerardasB GerardasB self-assigned this Jan 17, 2025
@GerardasB
Copy link
Collaborator Author

@Mergifyio backport release/5.0.x

@GerardasB
Copy link
Collaborator Author

@Mergifyio backport release/5.1.x

Copy link
Contributor

mergify bot commented Jan 17, 2025

backport release/5.0.x

✅ Backports have been created

Copy link
Contributor

mergify bot commented Jan 17, 2025

backport release/5.1.x

✅ Backports have been created

@GerardasB GerardasB merged commit d867e2d into master Jan 17, 2025
20 checks passed
@GerardasB GerardasB deleted the issue-1178 branch January 17, 2025 10:04
@GerardasB GerardasB added bug Something isn't working patch Changes in this PR requires a patch release labels Jan 17, 2025
mergify bot pushed a commit that referenced this pull request Jan 17, 2025
* Add IMJS_USE_DEFAULT_POPOUT_URL

* Replace deprecated document.write

* rush change

* useDefaultPopoutUrl url param.

* Add tests

(cherry picked from commit d867e2d)
mergify bot pushed a commit that referenced this pull request Jan 17, 2025
* Add IMJS_USE_DEFAULT_POPOUT_URL

* Replace deprecated document.write

* rush change

* useDefaultPopoutUrl url param.

* Add tests

(cherry picked from commit d867e2d)
GerardasB added a commit that referenced this pull request Jan 17, 2025
#1181)

* Add IMJS_USE_DEFAULT_POPOUT_URL

* Replace deprecated document.write

* rush change

* useDefaultPopoutUrl url param.

* Add tests

(cherry picked from commit d867e2d)

Co-authored-by: GerardasB <[email protected]>
GerardasB added a commit that referenced this pull request Jan 17, 2025
#1180)

* Add IMJS_USE_DEFAULT_POPOUT_URL

* Replace deprecated document.write

* rush change

* useDefaultPopoutUrl url param.

* Add tests

(cherry picked from commit d867e2d)

Co-authored-by: GerardasB <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working patch Changes in this PR requires a patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Popout does not close properly when useDefaultPopoutUrl = false
2 participants