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
1 changed files with 8 additions and 0 deletions

View File

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