diff --git a/src/actions/admin.ts b/src/actions/admin.ts index c2af75466..8017daa88 100644 --- a/src/actions/admin.ts +++ b/src/actions/admin.ts @@ -90,7 +90,7 @@ const fetchConfig = () => const updateConfig = (configs: Record[]) => (dispatch: AppDispatch, getState: () => RootState) => { dispatch({ type: ADMIN_CONFIG_UPDATE_REQUEST, configs }); - return api(getState)('/api/v1/pleroma/admin/config', { method: 'POST', body: JSON.stringify(configs) }) + return api(getState)('/api/v1/pleroma/admin/config', { method: 'POST', body: JSON.stringify({ configs }) }) .then(({ json: data }) => { dispatch({ type: ADMIN_CONFIG_UPDATE_SUCCESS, configs: data.configs, needsReboot: data.need_reboot }); }).catch(error => { diff --git a/src/features/ui/util/global-hotkeys.tsx b/src/features/ui/util/global-hotkeys.tsx index e2337a8fe..ab33151fa 100644 --- a/src/features/ui/util/global-hotkeys.tsx +++ b/src/features/ui/util/global-hotkeys.tsx @@ -68,7 +68,7 @@ const GlobalHotkeys: React.FC = ({ children, node }) => { const element = node.current.querySelector('input#search') as HTMLInputElement; - if (element) { + if (element?.checkVisibility()) { element.focus(); } else { history.push('/search');