Skip to content

Native dialogs and popovers for modals, dropdowns and the reaction picker - #4280

Merged
jcbrand merged 17 commits into
masterfrom
native-dialog-overlays
Nov 29, 2026
Merged

jcbrand merged 17 commits into
masterfrom
native-dialog-overlays

Conversation

@jcbrand

@jcbrand jcbrand commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

Replaces the Bootstrap modal, dropdown and popover JavaScript with the browser's own <dialog> and Popover API.

  • Modals are native dialogs opened with showModal(). Escape, the mobile back gesture, a click on the backdrop and the header's close button close them, focus goes back to the opener, and scrolling stays inside the modal. The footer's redundant Close button is gone. Confirm and alert prompts resolve from the dialog's return value. The api.modal methods are unchanged.
  • Dropdowns built on DropdownBase, and the reaction picker, are popover="auto" elements placed with CSS anchor positioning. They draw above everything else, so scrolling panes no longer clip them, and they flip to stay on screen. The browser closes them on Escape and on a click outside. Arrow-key navigation, the show class and the converse:dropdown:* events are unchanged.
  • The login form's info hint is a native popover shown while its button has focus.
  • Fallbacks: Popper and @oddbird/popover-polyfill are separate chunks, loaded only in browsers without anchor positioning or popover support.

No more Bootstrap JavaScript hooks. No Bootstrap JavaScript is left in the bundle, and the markup no longer carries Bootstrap's data-toggle, data-target or data-bs-dismiss attributes, which a host page's own Bootstrap would act on. Bootstrap's CSS classes are kept.

Breaking for plugins with their own modals:

  • Modals fire only converse:modal:* events; the *.bs.modal events are gone.
  • Elements with data-converse-dismiss close a modal; data-bs-dismiss no longer does.

Fixes #1440

Testing: the suite runs in Chromium only. The Popper fallback was checked by hand with anchor positioning switched off; the popover polyfill is not tested.

@jcbrand
jcbrand marked this pull request as ready for review November 29, 2026 14:45
@jcbrand
jcbrand force-pushed the native-dialog-overlays branch from 244514d to a49e8f3 Compare November 29, 2026 15:10
@jcbrand
jcbrand force-pushed the native-dialog-overlays branch from a49e8f3 to 4a7fbc0 Compare November 29, 2026 15:18
@jcbrand
jcbrand merged commit ab07872 into master Nov 29, 2026
8 of 9 checks passed
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.

Bootstrap 3.3.7 Collipsable panels conflict

1 participant