# Does DMenu work in Modals?

**URL:** https://meta.discourse.org/t/does-dmenu-work-in-modals/393175
**Category:** Development
**Created:** [January 11, 2026, 9:45am UTC](https://meta.discourse.org/t/does-dmenu-work-in-modals/393175 "2026-01-11T09:45:23Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [January 11, 2026, 9:45am UTC](https://meta.discourse.org/t/does-dmenu-work-in-modals/393175/1 "2026-01-11T09:45:23Z")

</div>

A search TextField when nested inside a DMenu and DropdownMenu, doesn’t seem to work in Modals.

It works fine on a normal page, e.g. profile settings, but when placed on a Modal the TextField doesn’t seem to respond to typing.

Is this because DMenu is using a portal and there is some problem with its relationship with the modal div?

Here’s an example:

> <https://github.com/merefield/discourse-locations/blob/598df9f4d36194da6e88921ecac39307d50e9dc0/assets/javascripts/discourse/components/geo-d-multi-select.gjs#L342>

Simply put, if I place a debugger statement on the search action, I can show that when placed in a Modal, you never arrive at the search function, but on a “normal” page (outside of a Modal), the event will fire correctly and the search is started.

You cant even type, even if I remove the event hooks.

If I place the TextField in this component outside of the DMenu (still accessed on a modal)- typing behaves as normal.

What am I missing, and why does the behaviour change?

---

_[View the full topic](https://meta.discourse.org/t/does-dmenu-work-in-modals/393175)._
