diff --git a/tildes/scss/modules/_dropdown.scss b/tildes/scss/modules/_dropdown.scss new file mode 100644 index 0000000..05a8d43 --- /dev/null +++ b/tildes/scss/modules/_dropdown.scss @@ -0,0 +1,8 @@ +// Copyright (c) 2020 Tildes contributors +// SPDX-License-Identifier: AGPL-3.0-or-later + +.dropdown { + .menu { + animation: none; + } +} diff --git a/tildes/scss/styles.scss b/tildes/scss/styles.scss index 19f1c75..4a4cd8c 100644 --- a/tildes/scss/styles.scss +++ b/tildes/scss/styles.scss @@ -15,6 +15,7 @@ @import "modules/comment"; @import "modules/divider"; @import "modules/donation"; +@import "modules/dropdown"; @import "modules/empty"; @import "modules/form"; @import "modules/group"; diff --git a/tildes/static/js/behaviors/dropdown-toggle.js b/tildes/static/js/behaviors/dropdown-toggle.js index 8789df9..7c5f4fb 100644 --- a/tildes/static/js/behaviors/dropdown-toggle.js +++ b/tildes/static/js/behaviors/dropdown-toggle.js @@ -6,16 +6,11 @@ // with the dropdown-toggle class so that this behavior is always applied to dropdowns. $.onmount(".dropdown-toggle", function() { $(this).click(function() { - if ($(this).is(":focus")) { - // If the button was already focused (so the menu is visible), close it - $(this).blur(); - } else { - // Spectre.css's dropdown menus use the focus event to display the menu, - // but Safari and Firefox on OSX don't give focus to a