html - Focusing input blocks page on Safari, when part of element with Popover API - Stack Overflow

I'm using the Popover API and there are so many issues on iOS Safariusing <dialog> combined

I'm using the Popover API and there are so many issues on iOS Safari

  • using <dialog> combined with a form and input causes it to block the rest of the page (.cgi?id=276864)
  • instead I tried using a <div> with role="dialog" and adding autofocus on the input, but that doesn't even open the popover ...
  • skipping all that I tried using a form with an input field, but I cannot focus or type in it. Page seems to be blocked.

This above works fine in all browsers supporting Popover API, except for Safari 18+ on iOS (it does work on MacOS).

Is there something I miss because I seem to be blocked with the combination of a form and popover on iOS Safari. Forms and popover API seem to be unusable?

Here's a Codepen with the 3 situations

I'm using the Popover API and there are so many issues on iOS Safari

  • using <dialog> combined with a form and input causes it to block the rest of the page (https://bugs.webkit./show_bug.cgi?id=276864)
  • instead I tried using a <div> with role="dialog" and adding autofocus on the input, but that doesn't even open the popover ...
  • skipping all that I tried using a form with an input field, but I cannot focus or type in it. Page seems to be blocked.

This above works fine in all browsers supporting Popover API, except for Safari 18+ on iOS (it does work on MacOS).

Is there something I miss because I seem to be blocked with the combination of a form and popover on iOS Safari. Forms and popover API seem to be unusable?

Here's a Codepen with the 3 situations https://codepen.io/Bregt/pen/MYWEpvd

Share Improve this question edited Mar 11 at 14:51 Bregt asked Mar 11 at 14:20 BregtBregt 1911 silver badge12 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Okay this seems to be a bug that is fixed in 18.4. https://developer.apple/documentation/safari-release-notes/safari-18_4-release-notes

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744788767a4593786.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信