1
0
mirror of https://github.com/flarum/core.git synced 2025-08-05 07:57:46 +02:00

fix: typo in Dropdown.ts

This commit is contained in:
Daniël Klabbers
2024-12-04 21:47:02 +01:00
committed by GitHub
parent 097a54289f
commit 6d88c99782

View File

@@ -93,12 +93,12 @@ export default class Dropdown<CustomAttrs extends IDropdownAttrs = IDropdownAttr
const top = $menu.offset()?.top ?? 0;
const height = $menu.height() ?? 0;
const windowSrollTop = $(window).scrollTop() ?? 0;
const windowScrollTop = $(window).scrollTop() ?? 0;
const windowHeight = $(window).height() ?? 0;
$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) {
$menu.removeClass('Dropdown-menu--top');