Skip to content

Commit

Permalink
Merge pull request #757 from OpenGeoscience/fix-keyboard-unbindings
Browse files Browse the repository at this point in the history
Fix keyboard unbindings.
  • Loading branch information
manthey authored Jan 11, 2018
2 parents cd102dc + ccd5a96 commit 520b41d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mapInteractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ var mapInteractor = function (args) {
m_boundKeys = bound;
}
$node.toggleClass('highlight-focus',
m_boundKeys && m_boundKeys.length && m_options.keyboard.focusHighlight);
!!(m_boundKeys && m_boundKeys.length && m_options.keyboard.focusHighlight));

// bind touch events
if ((m_this.hasTouchSupport() || m_options.alwaysTouch) &&
Expand Down Expand Up @@ -748,7 +748,7 @@ var mapInteractor = function (args) {
this._disconnectEvents = function () {
if (m_boundKeys) {
if (m_keyHandler) {
m_boundKeys.every(m_keyHandler.unbind, m_keyHandler);
m_keyHandler.unbind(m_boundKeys);
}
m_boundKeys = null;
m_keyHandler = null;
Expand Down

0 comments on commit 520b41d

Please sign in to comment.