Skip to content

Commit

Permalink
Remove dynamic keyboard event mode (#653)
Browse files Browse the repository at this point in the history
* The keyboard event mode cannot be dynamically set up anymore, as it was only experiemntal

* Fix API changes and remove debug message
  • Loading branch information
brichet committed Oct 31, 2023
1 parent b4c297a commit c94ef4d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
17 changes: 0 additions & 17 deletions packages/application/src/index.ts
Expand Up @@ -188,20 +188,6 @@ export class Application<T extends Widget = Widget> {
return this._delegate.promise;
}

/**
* Getter and setter for the bubblingKeydown experimental flag.
*
* @experimental
*/
get bubblingKeydown(): boolean {
return this._bubblingKeydown;
}
set bubblingKeydown(value: boolean) {
document.removeEventListener('keydown', this, !this._bubblingKeydown);
this._bubblingKeydown = value;
document.addEventListener('keydown', this, !this._bubblingKeydown);
}

/**
* Get a plugin description.
*
Expand Down Expand Up @@ -622,9 +608,6 @@ export class Application<T extends Widget = Widget> {
* A subclass may reimplement this method as needed.
*/
protected addEventListeners(): void {
if (this._bubblingKeydown) {
console.log('The keydown events are handled during bubbling phase');
}
document.addEventListener('contextmenu', this);
document.addEventListener('keydown', this, !this._bubblingKeydown);
window.addEventListener('resize', this);
Expand Down
2 changes: 0 additions & 2 deletions review/api/application.api.md
Expand Up @@ -17,8 +17,6 @@ export class Application<T extends Widget = Widget> {
activatePlugin(id: string): Promise<void>;
protected addEventListeners(): void;
protected attachShell(id: string): void;
get bubblingKeydown(): boolean;
set bubblingKeydown(value: boolean);
readonly commands: CommandRegistry;
readonly contextMenu: ContextMenu;
deactivatePlugin(id: string): Promise<string[]>;
Expand Down

0 comments on commit c94ef4d

Please sign in to comment.