Skip to content

彈出式選單希望可以有方法在重複點擊時保持開啟 #1063

@itshenrywu

Description

@itshenrywu

<input> 輸入框上使用時,如果重複點擊,彈出式選單就會被一直關閉、開啟,感覺會有點怪

如果可以加入 data-autoclose 之類的 key,就可以判斷點擊時的動作

// 切換目標彈出式選單的可見度。
if (element.dataset.autoclose === "false") {
    target.classList.add("is-visible")
} else {
    target.classList.toggle("is-visible")
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions