[Glitch] Improve dropdown menu keyboard navigation

Port a12f1a0baf to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
ThibG
2019-08-06 11:59:46 +02:00
committed by Thibaut Girka
parent 6afdb6c2b6
commit fe1de4e49b
4 changed files with 30 additions and 21 deletions

View File

@ -10,7 +10,7 @@ export default function modal(state = initialState, action) {
case MODAL_OPEN:
return { modalType: action.modalType, modalProps: action.modalProps };
case MODAL_CLOSE:
return initialState;
return (action.modalType === undefined || action.modalType === state.modalType) ? initialState : state;
default:
return state;
}