mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-08-07 17:48:27 +00:00
[ACA] contextmenu - document click event breaks implementation in FF (#593)
* listen event from body element * add event parameter
This commit is contained in:
committed by
Denys Vuika
parent
08917e862c
commit
d607618920
@@ -15,7 +15,7 @@ export class OutsideEventDirective implements OnInit, OnDestroy {
|
||||
|
||||
ngOnInit() {
|
||||
this.subscriptions = this.subscriptions.concat([
|
||||
fromEvent(document, 'click')
|
||||
fromEvent(document.body, 'click')
|
||||
.pipe(delay(1))
|
||||
.subscribe(() => this.clickOutside.next())
|
||||
]);
|
||||
|
@@ -68,7 +68,7 @@ export class ContextActionsDirective {
|
||||
) { }
|
||||
|
||||
private execute(event: MouseEvent) {
|
||||
const selected = this.getSelectedRow();
|
||||
const selected = this.getSelectedRow(event);
|
||||
|
||||
if (selected) {
|
||||
if (!this.isInSelection(selected)) {
|
||||
@@ -108,7 +108,7 @@ export class ContextActionsDirective {
|
||||
row.getValue('name') === selected.entry.name);
|
||||
}
|
||||
|
||||
private getSelectedRow(): DataRow {
|
||||
private getSelectedRow(event): DataRow {
|
||||
const rowElement = this.findAncestor(<HTMLElement>event.target, 'adf-datatable-row');
|
||||
|
||||
if (!rowElement) {
|
||||
|
Reference in New Issue
Block a user