Skip to content

Commit

Permalink
fixup! Fix keyboard behavior according to proposal (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
AKalinich-Luxoft committed Jan 26, 2021
1 parent d281e6e commit 02c7de3
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions app/controller/sdl/KeyboardController.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ SDL.KeyboardController = Em.Object.create({
if (SDL.SDLController.model &&
SDL.SDLController.model.activeRequests.uiPerformInteraction &&
!SDL.InteractionChoicesView.active) {
FFW.UI.OnKeyboardInput('', 'ENTRY_CANCELLED');
SDL.InteractionChoicesView.deactivate('ABORTED');
}
SDL.Keyboard.deactivate();
FFW.UI.OnKeyboardInput('', 'ENTRY_CANCELLED');
SDL.InteractionChoicesView.deactivate('ABORTED');
}
SDL.Keyboard.deactivate();
},

/**
Expand Down Expand Up @@ -137,7 +137,7 @@ SDL.KeyboardController = Em.Object.create({
},

/**
* @description Disables or enables charaters depeding on global properties
* @description Disables or enables characters depending on global properties
*/
disableButtons: function() {
if (SDL.SDLController.model) {
Expand Down Expand Up @@ -197,9 +197,10 @@ SDL.KeyboardController = Em.Object.create({
return true;
}

return SDL.SDLController.model ?
SDL.SDLController.model.globalProperties.keyboardProperties.keyboardLayout == layout :
false;
return SDL.SDLController.model &&
SDL.SDLController.model.globalProperties.keyboardProperties ?
SDL.SDLController.model.globalProperties.keyboardProperties.keyboardLayout == layout :
false;
},

/**
Expand Down Expand Up @@ -324,7 +325,7 @@ SDL.KeyboardController = Em.Object.create({
if (SDL.KeyboardController.maskCharacters) {
SDL.Keyboard.searchBar.input.type = 'password';
} else {
SDL.Keyboard.searchBar.input.type = 'text';
SDL.Keyboard.searchBar.input.type = 'text';
}

// To apply style updates on UI
Expand Down

0 comments on commit 02c7de3

Please sign in to comment.