fonsp / Pluto.jl

🎈 Simple reactive notebooks for Julia
https://plutojl.org/
MIT License
4.91k stars 284 forks source link

Make the pkg popup tab-friendly #2752

Closed fonsp closed 7 months ago

fonsp commented 7 months ago

This makes the pluto-popup tab-friendly.

Some "spontaneous" popups, like the message "another cell was disabled because it also defines xyz" or #2746 are unchanged: they should not interfere with keyboard focus.

But popups like the Pkg popup (clicking the checkmark next to using Plots) should behave like a non-modal dialog: when opened, the first interactive item should be focused, and when focus leaves the popup, the popup should close and focus should return to the button that opened it.

https://github.com/fonsp/Pluto.jl/assets/6933510/b8dd5f25-e156-4bca-99d6-3f13cc7e91b8

github-actions[bot] commented 7 months ago

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="pluto-popup-tabindex")
  julia> using Pluto