Skip to content

Commit

Permalink
PLAT-109019: Correctly maintain pointer mode on webOS (#2794)
Browse files Browse the repository at this point in the history
Integrated-By: Ryan Duffy ([email protected])
  • Loading branch information
germboy authored Jun 19, 2020
1 parent d4e3d22 commit 412e510
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/spotlight/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The following is a curated list of changes in the Enact spotlight module, newest
### Fixed

- `spotlight` to trigger `onLeaveContainerFail` when `leaveFor` prevents navigation
- `spotlight` to correctly maintain pointer mode on webOS

## [3.3.0-alpha.12] - 2020-06-15

Expand Down
8 changes: 7 additions & 1 deletion packages/spotlight/src/pointer.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,20 @@ const notifyPointerMove = (current, target, x, y) => {
* @private
*/
const notifyKeyDown = (keyCode, callback) => {
const palmSystem = window.PalmSystem;

// for hide/show pointer events, handle them and return true
if (is('pointerHide', keyCode)) {
hidePointerJob.start(callback);
return true;
} else if (is('pointerShow', keyCode)) {
setPointerMode(true);
return true;
} else if (!is('nonModal', keyCode) && !is('cancel', keyCode)) {
} else if (
!is('nonModal', keyCode) &&
!is('cancel', keyCode) &&
!(is('enter', keyCode) && palmSystem && palmSystem.cursor && palmSystem.cursor.visibility)
) {
setPointerMode(false);
}

Expand Down

0 comments on commit 412e510

Please sign in to comment.