mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
prevent children events from bubbling up (#7040)
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, HostListener, ViewEncapsulation } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-viewer-sidebar',
|
||||
@@ -25,4 +25,13 @@ import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/
|
||||
template: `<ng-content></ng-content>`
|
||||
})
|
||||
export class ViewerSidebarComponent {
|
||||
@HostListener('keydown', ['$event'])
|
||||
onKeyDown(event: KeyboardEvent) {
|
||||
event.cancelBubble = true;
|
||||
}
|
||||
|
||||
@HostListener('keyup', ['$event'])
|
||||
onKeyUp(event: KeyboardEvent) {
|
||||
event.cancelBubble = true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user