mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibWeb: Improve <select> dropdown position
This commit is contained in:
Notes:
github-actions[bot]
2025-01-14 07:35:48 +00:00
Author: https://github.com/Psychpsyo Commit: https://github.com/LadybirdBrowser/ladybird/commit/5b9d18b4623 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3250 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -431,7 +431,7 @@ void HTMLSelectElement::show_the_picker_if_applicable()
|
||||
// Request select dropdown
|
||||
auto weak_element = make_weak_ptr<HTMLSelectElement>();
|
||||
auto rect = get_bounding_client_rect();
|
||||
auto position = document().navigable()->to_top_level_position(Web::CSSPixelPoint { rect->x(), rect->y() });
|
||||
auto position = document().navigable()->to_top_level_position(Web::CSSPixelPoint { rect->x(), rect->y() + rect->height() });
|
||||
document().page().did_request_select_dropdown(weak_element, position, CSSPixels(rect->width()), m_select_items);
|
||||
set_is_open(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user