Skip to content

Commit

Permalink
fix(select): stop click event bubbeling
Browse files Browse the repository at this point in the history
  • Loading branch information
hirsch88 committed Jun 9, 2022
1 parent aaee8a8 commit df25293
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
import { watchForOptions } from './utils/watch-options'
import { BalOptionValue } from './utils/bal-option.type'
import { Props, Events } from '../../../types'
import { stopEventBubbling } from '../../../helpers/form-input.helpers'

export interface BalOptionController extends BalOptionValue {
id: string
Expand Down Expand Up @@ -680,6 +681,8 @@ export class Select {
}

private handleInputClick = async (event: MouseEvent) => {
stopEventBubbling(event)

if (this.disabled || this.readonly) {
preventDefault(event)
} else {
Expand Down

0 comments on commit df25293

Please sign in to comment.