make sure ._ osx files are properly ignored

This commit is contained in:
Luke Pulverenti 2015-11-04 18:49:06 -05:00
parent cb8119840a
commit 67524136ed
48 changed files with 1239 additions and 387 deletions

View file

@ -136,14 +136,43 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
this._setPressed(false);
},
__isFocusedLightDescendant: function(target) {
var root = Polymer.dom(this).getOwnerRoot() || document;
var focusedElement = root.activeElement;
// TODO(noms): remove the `this !== target` check once polymer#2610 is fixed.
return this !== target && this.isLightDescendant(target) && target == focusedElement;
},
/**
* @param {!KeyboardEvent} event .
*/
_spaceKeyDownHandler: function(event) {
var keyboardEvent = event.detail.keyboardEvent;
var target = Polymer.dom(keyboardEvent).localTarget;
// Ignore the event if this is coming from a focused light child, since that
// element will deal with it.
if (this.__isFocusedLightDescendant(target))
return;
keyboardEvent.preventDefault();
keyboardEvent.stopImmediatePropagation();
this._setPressed(true);
},
_spaceKeyUpHandler: function() {
/**
* @param {!KeyboardEvent} event .
*/
_spaceKeyUpHandler: function(event) {
var keyboardEvent = event.detail.keyboardEvent;
var target = Polymer.dom(keyboardEvent).localTarget;
// Ignore the event if this is coming from a focused light child, since that
// element will deal with it.
if (this.__isFocusedLightDescendant(target))
return;
if (this.pressed) {
this._asyncClick();
}