[Webkit-unassigned] [Bug 261945] iOS 17 > <button /> inner <form /> can't summon popover element.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 18 01:25:24 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=261945

Jxck <jxck at jxck.io> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jxck at jxck.io

--- Comment #6 from Jxck <jxck at jxck.io> ---
Same problem here.

I have use-case like below.

- if user has permission, user can submit form
- otherwise, show popover

Do it like below.

```html
<form>
  <h1><label>popover DEMO</label></h1>
  <textarea id="anchor" name="body"></textarea>
  <div id="popover" anchor="anchor" popover>
    <p>you dont have permission</p>
  </div>
  <button type="button" popovertarget="popover">ok</button>
</form>
```

It intended to switch `button[type=submit]` for submit form, otherwise, make it `button[type=button]` for avoid submitting and show popover.

It works as expected in chrome & firefox. but not in safari.

DEMO: https://labs.jxck.io/popover/form.html

happy to see it works.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240418/486aec3f/attachment-0001.htm>


More information about the webkit-unassigned mailing list