FIX: ensures widget dropdown doesn't overflow document (#9590)

This commit is contained in:
Joffrey JAFFEUX 2020-04-29 21:12:32 +02:00 committed by GitHub
parent c85018cdfd
commit e1dbc700b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,5 @@
import { createWidget } from "discourse/widgets/widget"; import { createWidget } from "discourse/widgets/widget";
import { schedule } from "@ember/runloop";
import hbs from "discourse/widgets/hbs-compiler"; import hbs from "discourse/widgets/hbs-compiler";
/* /*
@ -252,6 +253,9 @@ export const WidgetDropdownClass = {
strategy: "fixed", strategy: "fixed",
placement: "bottom-start", placement: "bottom-start",
modifiers: [ modifiers: [
{
name: "preventOverflow"
},
{ {
name: "offset", name: "offset",
options: { options: {
@ -261,6 +265,10 @@ export const WidgetDropdownClass = {
] ]
}); });
} }
schedule("afterRender", () => {
this._popper && this._popper.update();
});
} }
}; };