Fix togglePopover logic.
Pull request: https://github.com/WebKit/WebKit/pull/11233
<rdar://problem/106433459>
Committed 261386@main (ceff29ca59cd): <https://commits.webkit.org/261386@main> Reviewed commits have been landed. Closing PR #11233 and removing active labels.
Re-opening for pull request https://github.com/WebKit/WebKit/pull/11287
Committed 261436@main (1cb92be2e4ce): <https://commits.webkit.org/261436@main> Reviewed commits have been landed. Closing PR #11287 and removing active labels.