Dropdown + modal fix

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-08-20 10:23:30 +02:00
parent 812aaab83f
commit 236e4db1a9
3 changed files with 5 additions and 3 deletions

View file

@ -108,7 +108,7 @@ const DropdownMenu = (props: IDropdownMenu) => {
const { state } = history.location;
if (goBack && state && (state as any).soapboxDropdownKey && (state as any).soapboxDropdownKey === dropdownHistoryKey.current) {
history.goBack();
(history.location.state as any).soapboxDropdownKey = true;
(history.location.state as any).soapboxDropdownKey = undefined;
}
closeDropdownMenu();

View file

@ -150,7 +150,9 @@ const ModalRoot: React.FC<IModalRoot> = ({ children, onCancel, onClose, type })
const handleModalOpen = () => {
modalHistoryKey.current = Date.now();
unlistenHistory.current = history.listen(({ state }, action) => {
if (!(state as any)?.soapboxModalKey) {
if ((state as any)?.soapboxDropdownKey) {
return;
} else if (!(state as any)?.soapboxModalKey) {
onClose();
} else if (action === 'POP') {
handleOnClose();

View file

@ -589,7 +589,7 @@
"crypto.lightning": "Lightning",
"crypto_donate.explanation_box.message": "{siteTitle} przyjmuje darowizny w kryptowalutach. Możesz wysłać darowiznę na jeden z poniższych adresów. Dziękujemy za Wasze wsparcie!",
"crypto_donate.explanation_box.title": "Przekaż darowiznę w kryptowalutach",
"crypto_donate_panel.actions.view": "Naciśnij, aby zobaczyć {count} więcej {count, plural, one {potrfel} few {portfele} many {portfeli}}",
"crypto_donate_panel.actions.view": "Naciśnij, aby zobaczyć {count} więcej {count, plural, one {potrfel} few {portfele} other {portfeli}}",
"crypto_donate_panel.heading": "Przekaż kryptowalutę",
"crypto_donate_panel.intro.message": "{siteTitle} przyjmuje darowizny w kryptowalutach, aby utrzymać naszą usługę. Dziękujemy za Wasze wsparcie!",
"datepicker.day": "Dzień",