Skip to content

A platform for community discussion. Free, open, simple.

UX: prevent float kit from repositioning when unanchored (#38118)

Krisb05f478346aa
diff --git a/frontend/discourse/float-kit/modifiers/apply-floating-ui.js b/frontend/discourse/float-kit/modifiers/apply-floating-ui.js
index 99c881f4f8c..bf7c340a1b3 100644
--- a/frontend/discourse/float-kit/modifiers/apply-floating-ui.js
+++ b/frontend/discourse/float-kit/modifiers/apply-floating-ui.js
@@ -31,6 +31,10 @@ export default class FloatKitApplyFloatingUi extends Modifier {
@bind
async update() {
+ if (this.instance.trigger?.isConnected === false) {
+ return;
+ }
+
await updatePosition(
this.instance.trigger,
this.instance.content,