make sure ._ osx files are properly ignored
This commit is contained in:
parent
cb8119840a
commit
67524136ed
48 changed files with 1239 additions and 387 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue