Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Focus on the confirm button when the popup component pops up #545

Open
XieZongChen opened this issue Jul 19, 2021 · 6 comments
Open

Focus on the confirm button when the popup component pops up #545

XieZongChen opened this issue Jul 19, 2021 · 6 comments
Assignees
Labels
a11y feature request New feature or request

Comments

@XieZongChen
Copy link
Collaborator

This function solves the problem (这个功能解决的问题)

Focus on the confirm button when the popup component pops up

Expected API (期望的 API)

Focus on the confirm button when the popup component pops up

@github-actions github-actions bot added the feature request New feature or request label Jul 19, 2021
@XieZongChen XieZongChen self-assigned this Jul 19, 2021
@002269
Copy link

002269 commented Jul 20, 2021

At least the focus should not still be on the button that triggered the click

@002269
Copy link

002269 commented Jul 20, 2021

Popconfirm 也一样

@XieZongChen
Copy link
Collaborator Author

Popconfirm 也一样

At least the focus should not still be on the button that triggered the click

In order to ensure the consistency of a11y in the whole component library, we need to design it as a whole, so this issue needs to wait.

@monkeyDLB
Copy link

请问 怎么给popconfirm加上 阻止冒泡? 有没有提供方法式的api? 现在又一个popconfirm在collpase上 点击后不想触发到外层的展开和收起

@07akioni
Copy link
Collaborator

07akioni commented Oct 4, 2022

请问 怎么给popconfirm加上 阻止冒泡? 有没有提供方法式的api? 现在又一个popconfirm在collpase上 点击后不想触发到外层的展开和收起

绑个 click 就可以了

image

@brumbyhhh
Copy link

只能这样写,写一个 click,不绑事件

<n-popconfirm @positive-click="handleDelete(article.articleId)">
    <template #trigger>
        <span class="my-auto hover:text-xl hover:text-red-500 hover:font-bold transition-all duration-300"
            v-show="commonStore.getRole === 'admin'" @click.stop="">x</span>
    </template>
    是否确定删除?
</n-popconfirm>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y feature request New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants