Skip to content

Outdated exception documentation for showPopover and hidePopover #44587

Closed

Description

@PatTheHyruler

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/showPopover

What specific section or headline is this issue about?

Exceptions

What information was incorrect, unhelpful, or incomplete?

It claims that showPopover will throw an InvalidStateError if the popover is already showing.
This appears to no longer be accurate, calling showPopover on a popover that is already showing is now a no-op.

hidePopover's documentation has the same problem. It claims hidePopover will throw InvalidStateError if the popover is already hidden, which is no longer true.

The description for togglePopover's force parameter also currently mentions the outdated exception-throwing behavior as if it were still valid.

What did you expect to see?

Either no mention of an exception being thrown if the popover is already in the requested state, or a notice that it used to throw, but no longer does.

Do you have any supporting links, references, or citations?

Do you have anything more you want to share?

Example:

<div id="mypopover" popover>
    Popover content
</div>

<button onclick="mypopover.showPopover()">
    Show popover
</button>

<button onclick="mypopover.hidePopover()">
    Hide popover
</button>

No exception is thrown when clicking on "Show popover" while the popover is shown, or clicking on "Hide popover" while the popover is hidden.

I tested this with:

  • Chrome 149.0.7827.116
  • Firefox 152.0.3

MDN metadata

Page report details

Activity

  1. added
    needs triage
    on Jun 27, 2026
  2. hamishwillee commented on Jul 17, 2026

    @hamishwillee
    Collaborator

    Thanks. FYI FF115 stopped throwing the exception in in https://bugzilla.mozilla.org/show_bug.cgi?id=1830736

  3. removed
    needs triage
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Content:WebAPI

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions