]> BookStack Code Mirror - bookstack/commit
Lexical: Updated dropdown handling to match tinymce behaviour
authorDan Brown <redacted>
Sun, 25 May 2025 15:28:42 +0000 (16:28 +0100)
committerDan Brown <redacted>
Sun, 25 May 2025 15:28:42 +0000 (16:28 +0100)
commit1243108e0fbaef6a0b678a872eb9fbf2f269a57a
tree678c43ccbb9936ae7341b68970d36ae6387b1473
parent32809193704b06dd8dbe2eb98bb1fe329138a0e7
Lexical: Updated dropdown handling to match tinymce behaviour

Now toolbars stay open on mouse-out, and close on other toolbar open,
outside click or an accepted action.
To support:
- Added new system to track and manage open dropdowns.
- Added way for buttons to optionally emit events upon actions.
- Added way to listen for events.
- Used the above to control when dropdowns should hide on action, since
  some dont (like overflow containers and split dropdown buttons).
resources/js/wysiwyg/ui/framework/blocks/dropdown-button.ts
resources/js/wysiwyg/ui/framework/blocks/format-menu.ts
resources/js/wysiwyg/ui/framework/blocks/overflow-container.ts
resources/js/wysiwyg/ui/framework/buttons.ts
resources/js/wysiwyg/ui/framework/core.ts
resources/js/wysiwyg/ui/framework/helpers/dropdowns.ts
resources/js/wysiwyg/ui/framework/manager.ts