From c1b311835bcc0d630486b86f8ea2abcc6f61de3b Mon Sep 17 00:00:00 2001 From: Rob Ryan Date: Sun, 3 Apr 2022 14:13:05 +1000 Subject: [PATCH] LibWeb: Not dispatching page_did_click_link event breaks page refresh The WebView url wouldn't update so reload in Tab would still use the previous URL before any left click navigation. I am unsure if there was any good reason not to dispatch the event when there are no modifiers. --- Userland/Libraries/LibWeb/Page/EventHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Page/EventHandler.cpp b/Userland/Libraries/LibWeb/Page/EventHandler.cpp index 4f92731e6e..c34f3f2429 100644 --- a/Userland/Libraries/LibWeb/Page/EventHandler.cpp +++ b/Userland/Libraries/LibWeb/Page/EventHandler.cpp @@ -218,7 +218,7 @@ bool EventHandler::handle_mouseup(Gfx::IntPoint const& position, unsigned button document->run_javascript(href.substring_view(11, href.length() - 11)); } else if (!url.fragment().is_null() && url.equals(document->url(), AK::URL::ExcludeFragment::Yes)) { m_browsing_context.scroll_to_anchor(url.fragment()); - } else if (modifiers != 0) { + } else { if (m_browsing_context.is_top_level()) { if (auto* page = m_browsing_context.page()) page->client().page_did_click_link(url, link->target(), modifiers);