mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
fix: typo in Dropdown.ts
This commit is contained in:
@@ -93,12 +93,12 @@ export default class Dropdown<CustomAttrs extends IDropdownAttrs = IDropdownAttr
|
|||||||
|
|
||||||
const top = $menu.offset()?.top ?? 0;
|
const top = $menu.offset()?.top ?? 0;
|
||||||
const height = $menu.height() ?? 0;
|
const height = $menu.height() ?? 0;
|
||||||
const windowSrollTop = $(window).scrollTop() ?? 0;
|
const windowScrollTop = $(window).scrollTop() ?? 0;
|
||||||
const windowHeight = $(window).height() ?? 0;
|
const windowHeight = $(window).height() ?? 0;
|
||||||
|
|
||||||
$menu.removeClass('Dropdown-menu--top Dropdown-menu--right');
|
$menu.removeClass('Dropdown-menu--top Dropdown-menu--right');
|
||||||
|
|
||||||
$menu.toggleClass('Dropdown-menu--top', top + height > windowSrollTop + windowHeight);
|
$menu.toggleClass('Dropdown-menu--top', top + height > windowScrollTop + windowHeight);
|
||||||
|
|
||||||
if (($menu.offset()?.top || 0) < 0) {
|
if (($menu.offset()?.top || 0) < 0) {
|
||||||
$menu.removeClass('Dropdown-menu--top');
|
$menu.removeClass('Dropdown-menu--top');
|
||||||
|
Reference in New Issue
Block a user