mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
LibWeb: Light dismiss popovers on click
This commit is contained in:
parent
6061da3382
commit
1f1884da54
Notes:
github-actions[bot]
2025-04-29 01:43:08 +00:00
Author: https://github.com/Gingeh
Commit: 1f1884da54
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4428
Reviewed-by: https://github.com/AtkinsSJ ✅
9 changed files with 308 additions and 6 deletions
|
@ -78,8 +78,9 @@ GC::Ptr<HTMLElement> PopoverInvokerElement::get_the_popover_target_element(GC::R
|
|||
{
|
||||
// To get the popover target element given a Node node, perform the following steps. They return an HTML element or null.
|
||||
|
||||
auto const* form_associated_element = dynamic_cast<FormAssociatedElement const*>(node.ptr());
|
||||
VERIFY(form_associated_element);
|
||||
auto const* form_associated_element = as_if<FormAssociatedElement>(*node);
|
||||
if (!form_associated_element)
|
||||
return {};
|
||||
|
||||
// 1. If node is not a button, then return null.
|
||||
if (!form_associated_element->is_button())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue