diff options
author | XhmikosR <xhmikosr@gmail.com> | 2021-11-09 16:43:02 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2022-01-29 14:25:30 +0300 |
commit | 7d3bc44bb0257baff2728ed0ec97c81cb636bcf5 (patch) | |
tree | 7676be45b3a0d0c28e3fff4f7d7c8ad757b38ef1 /js | |
parent | a8887ea8a8996cd1b8cb49040305b2b7e5c6447d (diff) |
dropdown: Move constant
Diffstat (limited to 'js')
-rw-r--r-- | js/src/dropdown.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/js/src/dropdown.js b/js/src/dropdown.js index 9baa8d3a1a..7f3b92655b 100644 --- a/js/src/dropdown.js +++ b/js/src/dropdown.js @@ -359,10 +359,6 @@ class Dropdown extends BaseComponent { continue } - const relatedTarget = { - relatedTarget: context._element - } - const composedPath = event.composedPath() const isMenuTarget = composedPath.includes(context._menu) if ( @@ -378,6 +374,8 @@ class Dropdown extends BaseComponent { continue } + const relatedTarget = { relatedTarget: context._element } + if (event.type === 'click') { relatedTarget.clickEvent = event } |