Bug 39291 - [Qt] Links are selected on right click by default
Summary: [Qt] Links are selected on right click by default
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P5 Minor
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on: 23351
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-18 07:25 PDT by Pierre Rossi
Modified: 2010-11-26 04:39 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Rossi 2010-05-18 07:25:50 PDT
And the current selection is discarded as a consequence.
The behavior seems different on Chromium though.
Comment 1 Antonio Gomes 2010-05-18 07:32:24 PDT
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 ...
Comment 2 Antonio Gomes 2010-05-18 07:40:38 PDT
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
(...)
Comment 3 Benjamin Poulain 2010-11-10 07:15:21 PST
Pierre, this bug is for you :). It should be trivial as soon as Antonio land 23351.
Comment 4 Antonio Gomes 2010-11-10 07:35:39 PST
(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 :)
Comment 5 Pierre Rossi 2010-11-26 04:39:48 PST
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. :)