#11869·coolify

[Bug]: Clicking an option in a table dropdown calls window.close() and closes the browser tab

Author: BeeSouulCreated Sep 17, 2026Updated Sep 17, 2026
Labels💤 Waiting for feedback

Description and Error Message

resources/views/components/table/dropdown.blade.php exposes only open, panelStyle, toggle() and updatePosition() in its x-data scope. It does not define close().

Every consumer of the component ends its option handlers with close(). Alpine resolves the expression against the component scope, then the parent scopes, finds nothing, and falls through to the global object, so the call becomes window.close().

In Firefox the tab closes. In Chromium the tab stays open, which is why the bug is invisible there.

Still present on main today: the component has no close(), and resources/views/livewire/project/new/select.blade.php:36 still calls it.

Expected Behavior

Clicking an option in the Filter menu should apply the filter and close the menu. The browser tab should stay open.

Steps to Reproduce

  1. Open Firefox.
  2. Go to Project > Environment > Add a new resource.
  3. Click Filter next to the search box, then click any option, for example Applications.
  4. The browser tab closes.

Coolify Version

v4.3.21

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24.04.5 LTS

Additional Information

Affected call sites (13 calls, 10 files)

  • resources/views/livewire/project/new/select.blade.php:36 (resource type filter)
  • resources/views/livewire/project/index.blade.php:67 (project sort)
  • resources/views/livewire/project/show.blade.php:87 (environment sort)
  • resources/views/livewire/project/resource/index.blade.php:133 (resource sort)
  • resources/views/livewire/tags/show.blade.php:60 (tag sort)
  • resources/views/livewire/settings/scheduled-jobs.blade.php:71, 85, 102
  • resources/views/livewire/project/application/backup/index.blade.php:125, 147
  • resources/views/livewire/project/service/volume-backup/index.blade.php:195, 217
  • resources/views/components/shared-variables/editor.blade.php:64, 73
  • resources/views/components/table/filter.blade.php:19 (Reset button, used by livewire/project/application/deployment/index.blade.php and livewire/project/shared/environment-variable/all.blade.php)

The last one behaves slightly differently: the line is wire:click="{{ $resetAction }}" @click="close()", so the Livewire reset request is sent and lands server side while the tab disappears. It also sits inside the shared component, so every future consumer of x-table.filter inherits it.

Verified on a running instance

Injecting the missing method into the live Alpine scope from the browser console fixes the behaviour immediately, with no server side change:

const root = [...document.querySelectorAll("button")].find(b => b.textContent.trim() === "Filter").closest("[x-data]");
Alpine.$data(root).close = function () { this.open = false };

After that, clicking an option closes the menu and applies the filter as intended, and the tab stays open.

Suggested fix

Add a close() method to the dropdown component, so the existing call sites work as intended:

     toggle() {
         if (this.open) {
             this.open = false;
             return;
         }
 
         this.panelStyle = 'position: fixed; min-width: 0; visibility: hidden;';
         this.open = true;
         this.$nextTick(() => this.updatePosition());
     },
+    close() {
+        this.open = false;
+    },

One place to change, and the 13 call sites stay untouched. Applied on my own instance, it works.

Context: the same component was reworked recently for its anchoring (#11309), which is when the position: fixed panel and updatePosition() came in. The missing close() looks like a leftover from that rework.