mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Key入力の動き改善
- Searchに内容がある時にEscを押すと内容をSearchの内容を削除する - Cmd + Fを押すとSearch inputがfocusされる
This commit is contained in:
@@ -34,7 +34,7 @@ class HomePage extends React.Component {
|
||||
let { nav, top, list, detail } = this.refs
|
||||
|
||||
if (top.isInputFocused() && !e.metaKey) {
|
||||
if (e.keyCode === 13 || e.keyCode === 27) top.blurInput()
|
||||
if (e.keyCode === 13 || e.keyCode === 27) top.escape()
|
||||
return
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ class HomePage extends React.Component {
|
||||
}
|
||||
|
||||
// `detail`の`openDeleteConfirmMenu`が`true`なら呼ばれない。
|
||||
if (e.keyCode === 27) {
|
||||
if (e.keyCode === 27 || (e.keyCode === 70 && e.metaKey)) {
|
||||
top.focusInput()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user