File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export const EVENT_STATE_SYNC = 'bv::collapse::sync::state'
4949// Private event we send to collapse to request state update sync event
5050export const EVENT_STATE_REQUEST = 'bv::request::collapse::state'
5151
52- const keyDownEvents = [ ENTER , SPACE ]
52+ const KEYDOWN_KEY_CODES = [ ENTER , SPACE ]
5353
5454const RX_SPLIT_SEPARATOR = / \s + /
5555
@@ -86,9 +86,11 @@ const addClickListener = (el, vnode) => {
8686 removeClickListener ( el )
8787 if ( vnode . context ) {
8888 const handler = evt => {
89- const targets = el [ BV_TOGGLE_TARGETS ] || [ ]
90- const ignore = evt . type === 'keydown' && ! arrayIncludes ( keyDownEvents , evt . keyCode )
91- if ( ! ignore && ! isDisabled ( el ) ) {
89+ if (
90+ ! ( evt . type === 'keydown' && ! arrayIncludes ( KEYDOWN_KEY_CODES , evt . keyCode ) ) &&
91+ ! isDisabled ( el )
92+ ) {
93+ const targets = el [ BV_TOGGLE_TARGETS ] || [ ]
9294 targets . forEach ( target => {
9395 vnode . context . $root . $emit ( EVENT_TOGGLE , target )
9496 } )
You can’t perform that action at this time.
0 commit comments