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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user