1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-21 03:18:23 +00:00

[wiki 'search'] use 'mod + k' instead of 'mod + f' to open the search… (#7032)

* [wiki 'search'] use 'mod + k' instead of 'mod + f' to open the search dialog

* [wiki 'search'] removed 'mod + k' in the placeholder on the UI
This commit is contained in:
llj
2024-11-13 11:04:34 +08:00
committed by GitHub
parent 9f320ab1d1
commit 47cced4525

View File

@@ -8,7 +8,6 @@ import { Utils } from '../../utils/utils';
import toaster from '../toast';
import Loading from '../loading';
import Wiki2SearchResult from './wiki2-search-result';
import { isModF } from '../../metadata/utils/hotkey';
import './wiki2-search.css';
@@ -28,7 +27,7 @@ function Wiki2Search({ setCurrentPage, config, getCurrentPageId, wikiId }) {
let highlightRef = useRef(null);
const onDocumentKeyDown = useCallback((e) => {
if (!isModalOpen && isModF(e)) {
if (!isModalOpen && isHotkey('mod+k')(e)) {
e.preventDefault();
e.stopPropagation();
setIsModalOpen(true);