Don't react to keyboard events when the focus is on editable inputs

This commit is contained in:
Frederic Junod
2013-08-19 09:29:09 +02:00
parent 554a725d1a
commit 9e8d559c1b
4 changed files with 23 additions and 4 deletions

View File

@@ -5,6 +5,7 @@ goog.provide('ol.interaction.KeyboardPan');
goog.require('goog.asserts');
goog.require('goog.events.KeyCodes');
goog.require('goog.events.KeyHandler.EventType');
goog.require('goog.functions');
goog.require('ol.View2D');
goog.require('ol.coordinate');
goog.require('ol.interaction.ConditionType');
@@ -34,8 +35,9 @@ ol.interaction.KeyboardPan = function(opt_options) {
* @private
* @type {ol.interaction.ConditionType}
*/
this.condition_ = goog.isDef(options.condition) ?
options.condition : ol.interaction.condition.noModifierKeys;
this.condition_ = goog.isDef(options.condition) ? options.condition :
goog.functions.and(ol.interaction.condition.noModifierKeys,
ol.interaction.condition.targetNotEditable);
/**
* @private