Skip to content
This repository was archived by the owner on Aug 7, 2020. It is now read-only.

Commit dd08a3e

Browse files
authored
fix(oui-select-picker): fix click propagation on parent label (#297)
1 parent dc04086 commit dd08a3e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/oui-select-picker/src/select-picker.controller.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ export default class SelectPickerController {
5555
this.labelElement = this.$element.find("label");
5656
this.labelElement.on("click", event => this.openSelectMenu(event));
5757

58+
// Prevent click propagation on parent label (Safari)
59+
this.dropdownElement = angular.element(this.$element[0].querySelectorAll(".ui-select-match"));
60+
this.dropdownElement.on("click", event => {
61+
event.stopPropagation();
62+
event.preventDefault();
63+
});
64+
5865
// Avoid apply undefined class if this.variant is not already set
5966
if (this.variant) {
6067
this.$element.addClass(`oui-select-picker_${this.variant}`);

0 commit comments

Comments
 (0)