From fd86124c32f32c11fb14e6913043050233b5df0f Mon Sep 17 00:00:00 2001 From: aasandei-vsp Date: Mon, 8 Dec 2025 13:30:21 +0200 Subject: [PATCH] Make selected value non-clickable A native HTML select cannot be triggered programatically to open, because this would post a security risk, so clicking on the selected value that is not part of the select element won't make the options dropdown open. In order to make the selected value look like part of the whole select flow, an absolute positioning is needed, which was already implemented. The issue was that the element would still be clickable, so cancelling the pointer events will make the click trigger go through it, directly to the select element. Issue: PER-10229 Archive-member-invite, access-role-dropdown, click area buggy --- .../shared/components/form-input/form-input.component.html | 2 +- .../shared/components/form-input/form-input.component.scss | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/shared/components/form-input/form-input.component.html b/src/app/shared/components/form-input/form-input.component.html index b1ef73456..bc5c94a61 100644 --- a/src/app/shared/components/form-input/form-input.component.html +++ b/src/app/shared/components/form-input/form-input.component.html @@ -31,7 +31,7 @@ } @if (type === 'select') {
{{ getOptionTextFromValue(control.value) || placeholder }} diff --git a/src/app/shared/components/form-input/form-input.component.scss b/src/app/shared/components/form-input/form-input.component.scss index 6deabe989..1b834a475 100644 --- a/src/app/shared/components/form-input/form-input.component.scss +++ b/src/app/shared/components/form-input/form-input.component.scss @@ -3,3 +3,7 @@ cursor: not-allowed; user-select: none; } + +.selected-option { + pointer-events: none; +}