Skip to content

Commit

Permalink
fix(ui): fix contextual menu click handler
Browse files Browse the repository at this point in the history
  • Loading branch information
ncarlier committed Apr 15, 2019
1 parent 4585920 commit 1413043
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/src/auth/AuthService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class AuthService {
this.userManager = new UserManager(settings)

Log.logger = console
Log.level = Log.INFO
Log.level = Log.WARN
}

public getUser() {
Expand Down
3 changes: 2 additions & 1 deletion ui/src/common/DropdownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ export default ({children}: Props) => {
const $el = e.target
if (!($el instanceof Element)) return
if (ref.current) {
const isButton = $el.parentElement && $el.parentElement.tagName === 'BUTTON'
const $details = $el.closest("details")
if ($details === ref.current && $details.hasAttribute('open')) {
if (isButton && $details === ref.current && $details.hasAttribute('open')) {
e.preventDefault()
}
ref.current.removeAttribute('open')
Expand Down

0 comments on commit 1413043

Please sign in to comment.