mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
fixed key events on inputs
This commit is contained in:
parent
7bb319ac8f
commit
d98a6d90b1
2 changed files with 9 additions and 2 deletions
|
@ -51,7 +51,7 @@ export const locationChanged = location => ({ type: ACTIONS.LOCATION_CHANGED, lo
|
|||
export const setReady = ready => ({ type: ACTIONS.SET_READY, ready });
|
||||
|
||||
export const gotVkUser = user => ({ type: ACTIONS.GOT_VK_USER, user });
|
||||
export const keyPressed = ({ key }) => ({ type: ACTIONS.KEY_PRESSED, key });
|
||||
export const keyPressed = ({ key, target: { tagName } }) => ({ type: ACTIONS.KEY_PRESSED, key, target: tagName });
|
||||
|
||||
export const searchSetTitle = title => ({ type: ACTIONS.SEARCH_SET_TITLE, title });
|
||||
export const searchSetDistance = distance => ({ type: ACTIONS.SEARCH_SET_DISTANCE, distance });
|
||||
|
|
|
@ -431,7 +431,14 @@ function* gotVkUserSaga({ user }) {
|
|||
yield put(setUser(data));
|
||||
}
|
||||
|
||||
function* keyPressedSaga({ key }): void {
|
||||
function* keyPressedSaga({ key, target }): any {
|
||||
if (
|
||||
target === 'INPUT' ||
|
||||
target === 'TEXTAREA'
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (key === 'Escape') {
|
||||
const { dialog_active, mode, renderer: { renderer_active } } = yield select(getState);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue