Skip to content

Commit 8bad0a3

Browse files
aasandei-vspcecilia-donnelly
authored andcommitted
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
1 parent 518b4c5 commit 8bad0a3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/app/shared/components/form-input/form-input.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
}
3232
@if (type === 'select') {
3333
<div
34-
class="input-vertical-select-placeholder"
34+
class="input-vertical-select-placeholder selected-option"
3535
[class.selected]="control.value"
3636
>
3737
{{ getOptionTextFromValue(control.value) || placeholder }}

src/app/shared/components/form-input/form-input.component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@
33
cursor: not-allowed;
44
user-select: none;
55
}
6+
7+
.selected-option {
8+
pointer-events: none;
9+
}

0 commit comments

Comments
 (0)