Fix titles for buttons

Keyboard-shortcut-mixin have to expose Shortcut and ShortcutSection,
so they can be used in createTitle methods in html.

Change-Id: I6ccc9f50c391285d59c1dd717806def9fd7cfbf1
This commit is contained in:
Milutin Kristofic
2020-08-31 14:30:36 +02:00
parent 8a4856f4c7
commit cf04b3774d

View File

@@ -800,6 +800,10 @@ const InternalKeyboardShortcutMixin = dedupingMixin(
@property({type: Object})
_shortcut_v_table: Map<string, string> = new Map();
Shortcut = Shortcut;
ShortcutSection = ShortcutSection;
modifierPressed(event: CustomKeyboardEvent) {
/* We are checking for g/v as modifiers pressed. There are cases such as
* pressing v and then /, where we want the handler for / to be triggered.
@@ -1049,6 +1053,8 @@ export const KeyboardShortcutMixin = <T extends Constructor<PolymerElement>>(
/** The interface corresponding to KeyboardShortcutMixin */
export interface KeyboardShortcutMixinInterface {
Shortcut: typeof Shortcut;
ShortcutSection: typeof ShortcutSection;
_shortcut_go_key_last_pressed: number | null;
_shortcut_v_key_last_pressed: number | null;
_shortcut_go_table: Map<string, string>;