Files
serenity/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp
Timothy Flynn d0e18b896b LibWeb: Support ctrl/cmd-clicking a link to open it in a new tab
The spec does not define activation behavior of ctrl/cmd clicks, so we
have to go a bit ad-hoc here. When an anchor element is clicked with the
cmd (on macOS) or ctrl (on other platforms) modifier pressed, we will
skip activation of that element and pass the event on to the chrome. We
still dispatch the event to allow scripts to cancel the event.

(cherry picked from commit 40b2d24d5585a94f09f521bb0ceb055dcae7b6e9)
2024-11-26 16:03:32 -05:00

6.5 KiB