Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit18d8ec4

Browse files
committed
refactor(CDropdown): update close button behavior
1 parent61835dd commit18d8ec4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎packages/coreui-vue/src/components/dropdown/CDropdownMenu.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,16 @@ const CDropdownMenu = defineComponent({
3737
returnclassNames
3838
}
3939

40-
consthandleKeyup=(event:Event)=>{
40+
consthandleKeyup=(event:KeyboardEvent)=>{
4141
if(autoClose===false){
4242
return
4343
}
44-
if(!dropdownMenuRef.value?.contains(event.targetasHTMLElement)){
44+
45+
if(event.key==='Escape'){
4546
hideMenu()
4647
}
4748
}
49+
4850
consthandleMouseUp=(event:Event)=>{
4951
if(dropdownToggleRef.value?.contains(event.targetasHTMLElement)){
5052
return

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp