Bug 39291
Summary: | [Qt] Links are selected on right click by default | ||
---|---|---|---|
Product: | WebKit | Reporter: | Pierre Rossi <pierre.rossi> |
Component: | Text | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Minor | CC: | benjamin, kling, tonikitoo |
Priority: | P5 | Keywords: | Qt, QtTriaged |
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | 23351 | ||
Bug Blocks: |
Pierre Rossi
And the current selection is discarded as a consequence.
The behavior seems different on Chromium though.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Antonio Gomes
imo, it either depends on bug 23351 or is a duplicated of bug 36627
ps: when reporting, please use the 'Qt' Keyword, assign to unassigned-qtwebkit-bugs and etc ...
Antonio Gomes
more info here:
WebCore/page/EventHandler.cpp
(...)
#if ENABLE(CONTEXT_MENUS)
bool EventHandler::sendContextMenuEvent(const PlatformMouseEvent& event)
{
Document* doc = m_frame->document();
FrameView* v = m_frame->view();
if (!v)
return false;
(...)
// Context menu events shouldn't select text in GTK+ applications or in Chromium.
// FIXME: This should probably be configurable by embedders. Consider making it a WebPreferences setting.
// See: https://bugs.webkit.org/show_bug.cgi?id=15279
#if !PLATFORM(GTK) && !PLATFORM(CHROMIUM)
if (!m_frame->selection()->contains(viewportPos) &&
// FIXME: In the editable case, word selection sometimes selects content that isn't underneath the mouse.
// If the selection is non-editable, we do word selection to make it easier to use the contextual menu items
// available for text selections. But only if we're above text.
(m_frame->selection()->isContentEditable() || (mev.targetNode() && mev.targetNode()->isTextNode()))) {
m_mouseDownMayStartSelect = true; // context menu events are always allowed to perform a selection
selectClosestWordOrLinkFromMouseEvent(mev);
}
#endif
(...)
Benjamin Poulain
Pierre, this bug is for you :). It should be trivial as soon as Antonio land 23351.
Antonio Gomes
(In reply to comment #3)
> Pierre, this bug is for you :). It should be trivial as soon as Antonio land 23351.
Plan is for it to land tonight :)
Pierre Rossi
Fixed as a consequence of fixing 23351.
The test editing/selection/context-menu-text-selection.html works as well, so there is really nothing left to do about this. :)