Skip to content

Commit

Permalink
Fixed wallet dropdown
Browse files Browse the repository at this point in the history
Fixed wallet dropdown issue caused by Bootstrap popover and popper.js bug
  • Loading branch information
josemmo committed Feb 23, 2019
1 parent 230023f commit bac9184
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/js/ui/walletDropdownRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function getDropdownContents() {
if (isDisabled) {
$wallet.addClass('text-muted')
} else {
$wallet.addClass('list-group-item-action').attr('data-index', index)
$wallet.addClass('list-group-item-action').attr('id', `wallet-${index}`)
}
$elem.append($wallet)
})
Expand Down Expand Up @@ -110,8 +110,8 @@ $dropdown.popover({
})

// Attach dropdown listeners
$('body').on('click', '.wallet-dropdown-popover a[data-index]', function() {
const index = $(this).data('index')
$('body').on('mousedown', '.wallet-dropdown-popover a[id]', function() {
const index = Number($(this).attr('id').split('-')[1])
requestChangeWallet(index)
}).on('refreshUi', $dropdown, function() {
renderDropdownStatus()
Expand Down

0 comments on commit bac9184

Please sign in to comment.