mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-21 19:37:28 +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:
@@ -8,7 +8,6 @@ import { Utils } from '../../utils/utils';
|
|||||||
import toaster from '../toast';
|
import toaster from '../toast';
|
||||||
import Loading from '../loading';
|
import Loading from '../loading';
|
||||||
import Wiki2SearchResult from './wiki2-search-result';
|
import Wiki2SearchResult from './wiki2-search-result';
|
||||||
import { isModF } from '../../metadata/utils/hotkey';
|
|
||||||
|
|
||||||
import './wiki2-search.css';
|
import './wiki2-search.css';
|
||||||
|
|
||||||
@@ -28,7 +27,7 @@ function Wiki2Search({ setCurrentPage, config, getCurrentPageId, wikiId }) {
|
|||||||
let highlightRef = useRef(null);
|
let highlightRef = useRef(null);
|
||||||
|
|
||||||
const onDocumentKeyDown = useCallback((e) => {
|
const onDocumentKeyDown = useCallback((e) => {
|
||||||
if (!isModalOpen && isModF(e)) {
|
if (!isModalOpen && isHotkey('mod+k')(e)) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
setIsModalOpen(true);
|
setIsModalOpen(true);
|
||||||
|
Reference in New Issue
Block a user