Merge pull request #6466 from opf/fix/28105/click-on-button-in-formattable

[28105] Fix click on button in formattable not going through

[ci skip]
pull/6470/head
Oliver Günther 6 years ago committed by GitHub
commit e0b8aff8c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      frontend/src/app/components/wp-edit/wp-edit-field/wp-edit-field.component.ts
  2. 1
      frontend/src/app/components/wp-edit/wp-edit-field/wp-edit-field.html

@ -123,11 +123,18 @@ export class WorkPackageEditFieldComponent implements OnInit {
return true;
}
// Skip activation if the user clicked on a link
const target = jQuery(event.target);
if (target.closest('a', this.displayContainer.nativeElement).length > 0) {
return true;
}
if (this.isEditable) {
this.handleUserActivate(event);
}
this.opContextMenu.close();
event.preventDefault();
event.stopImmediatePropagation();
return false;
@ -145,13 +152,6 @@ export class WorkPackageEditFieldComponent implements OnInit {
let positionOffset = 0;
if (evt) {
// Skip activation if the user clicked on a link
const target = jQuery(evt.target);
if (target.closest('a', this.displayContainer.nativeElement).length > 0) {
return true;
}
// Get the position where the user clicked.
positionOffset = ClickPositionMapper.getPosition(evt);
}

@ -10,6 +10,7 @@
</div>
<div (accessibleClick)="activateIfEditable($event)"
[accessibleClickStopEvent]="false"
[hidden]="active"
tabindex="-1"
#displayContainer></div>

Loading…
Cancel
Save