1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 Polymer('kb-altkey-container', {
6 resetActiveElement: function() {
7 var activeAccentKeySet
= this.querySelector('#' + this.keyset
);
8 var offset
= activeAccentKeySet
.offset
;
9 var element
= activeAccentKeySet
.firstElementChild
;
11 element
= element
.nextElementSibling
;
14 element
.classList
.add('active');
16 up: function(detail
) {
18 this.resetActiveElement();
21 out: function(event
) {
22 // Check if touch is outside container boundaries.
23 if(!(this.compareDocumentPosition(event
.relatedTarget
)
24 & Node
.DOCUMENT_POSITION_CONTAINED_BY
)) {
29 hiddenChanged: function() {
30 this.fire('stateChange', {
31 state
: 'candidatePopupVisibility',