1
0
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:
Rokt33r
2015-10-31 18:29:45 +09:00
parent 954e148be3
commit 60e551e273
3 changed files with 17 additions and 3 deletions

View File

@@ -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()
}