Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: third_party/polymer/v0_8/components-chromium/iron-menu-behavior/iron-menubar-behavior-extracted.js

Issue 1162563004: Upgrade to 1.0 and switch clients to dom-repeat where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a layout import and remove the gzipped webanimation in reproduce.sh Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1
2
3 /**
4 * `Polymer.IronMenubarBehavior` implements accessible menubar behavior.
5 *
6 * @polymerBehavior Polymer.IronMenubarBehavior
7 */
8 Polymer.IronMenubarBehaviorImpl = {
9
10 hostAttributes: {
11 'role': 'menubar'
12 },
13
14 keyBindings: {
15 'left': '_onLeftKey',
16 'right': '_onRightKey'
17 },
18
19 _onUpKey: function(event) {
20 this._activateFocused(event.detail.keyboardEvent);
21 },
22
23 _onDownKey: function(event) {
24 this._activateFocused(event.detail.keyboardEvent);
25 },
26
27 _onLeftKey: function() {
28 this._focusPrevious();
29 },
30
31 _onRightKey: function() {
32 this._focusNext();
33 },
34
35 _onKeydown: function(event) {
36 if (this.keyboardEventMatchesKeys(event, 'up down left right esc enter')) {
37 return;
38 }
39
40 // all other keys focus the menu item starting with that character
41 this._focusWithKeyboardEvent(event);
42 }
43
44 };
45
46 /** @polymerBehavior Polymer.IronMenubarBehavior */
47 Polymer.IronMenubarBehavior = [
48 Polymer.IronMenuBehavior,
49 Polymer.IronMenubarBehaviorImpl
50 ];
51
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698