mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-24 17:14:15 -05:00
a12f1a0baf
* Allow selecting menu items with the space bar in status dropdown menus * Fix modals opened by keyboard navigation being immediately closed * Fix menu items triggering modal actions * Add Tab trapping inside dropdown menu * Give focus back to last focused element when status dropdown menu closes
18 lines
309 B
JavaScript
18 lines
309 B
JavaScript
export const MODAL_OPEN = 'MODAL_OPEN';
|
|
export const MODAL_CLOSE = 'MODAL_CLOSE';
|
|
|
|
export function openModal(type, props) {
|
|
return {
|
|
type: MODAL_OPEN,
|
|
modalType: type,
|
|
modalProps: props,
|
|
};
|
|
};
|
|
|
|
export function closeModal(type) {
|
|
return {
|
|
type: MODAL_CLOSE,
|
|
modalType: type,
|
|
};
|
|
};
|