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(dialogs): backward compatible dialog usage #2816

Merged
merged 2 commits into from
Feb 20, 2024
Merged

fix(dialogs): backward compatible dialog usage #2816

merged 2 commits into from
Feb 20, 2024

Conversation

pankgeorg
Copy link
Collaborator

@pankgeorg pankgeorg commented Feb 19, 2024

There is an issue in Firefox 91 where the close() method is being called but it also doesn't exists (which is weird because it should have been polyfilled).

This may be a race condition though.

In any case, the optional chaining of a function call should be invoked with ?.(), to guard for null up the chain.

We also only call the polyfill when the element is not there and we guard the method calls vs the open attribute.

Copy link
Contributor

Try this Pull Request!

Open Julia and type:

julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="pg/modal-fix")
julia> using Pluto

@pankgeorg pankgeorg changed the title fix(useDialog): optionally chain the method calls too fix(useDialog): backward compatible dialog usage Feb 19, 2024
@pankgeorg pankgeorg changed the title fix(useDialog): backward compatible dialog usage fix(dialogs): backward compatible dialog usage Feb 19, 2024
@fonsp fonsp merged commit dec9a98 into main Feb 20, 2024
3 checks passed
@fonsp fonsp deleted the pg/modal-fix branch February 20, 2024 09:20
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.

2 participants