vaadin:排除tabbing订单中的可读字段

发布于 2025-02-09 22:23:52 字数 490 浏览 2 评论 0原文

在vaadin 23形式中,有一些输入字段。其中一些是只读的。

我想从表顺序排除这些仅阅读字段。

https://vaadin.com/docs/docs/latest/latest/latest/latest/componets/components/input-field-fields#ponets/input-fields#焦点说明:

不能编辑仅阅读元素,但是它们处于标签顺序中,因此可以接受焦点。

有没有办法将仅阅读元素排除在表顺序之外,但是将所有其他属性保留为IS?例如,我想保留用户标记内容并复制它的功能。

不打算禁用输入字段(而不是将其设置为ROADONLY)。

In a Vaadin 23 form there are some input fields. Some of them are read-only.

I want to exclude these read-only fields from tabbing order.

https://vaadin.com/docs/latest/components/input-fields#focus states hits:

Read-only elements cannot be edited, but they are in the tabbing order and can thus receive focus.

Is there a way to exclude read-only elements from tabbing order, but keep all other properties as-is? E.g. I'd like to keep the functionality for the user to mark the content and copy it.

Disabling the input fields (instead of setting them readonly) is not intended.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

三生殊途 2025-02-16 22:23:52

为这些字段设置Tabindex =“ - 1”就足够了。

field.setTabIndex(-1);

< .com/api/platform/23.1.1/com/com/vaadin/flow/component/coppoent.html#settabindex(int)

Setting tabindex="-1" for those fields should be enough.

field.setTabIndex(-1);

https://vaadin.com/api/platform/23.1.1/com/vaadin/flow/component/Focusable.html#setTabIndex(int)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文