Closed Bug 416546 Opened 17 years ago Closed 9 months ago

Right click on mouseup should move the caret to that place

Categories

(Core :: DOM: Selection, defect, P3)

x86
Windows XP
defect

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox119 --- wontfix
firefox120 --- fixed

People

(Reporter: martijn.martijn, Assigned: masayuki)

References

Details

IE7 on windows moves the caret in text inputs and textareas in content areas on mouseup of a right-click.
That's convenient when you want to right-click paste something at a specific location, you don't have to first left-click with the mouse to position it.

However, IE7 doesn't seem to do this for the url bar (or any other chrome text input).

Maybe this should be a platform specific setting?
I have no idea what happens on linux/Mac.
Safari on Windows seems to select the whole line on mouseup at that place with right-click.
Note that IE7 doesn't remove the selection when right-clicking above a selection.
Also note that if this would be changed it could make it more difficult to copy paste selections.
Component: Editor → Selection
QA Contact: editor → selection
(In reply to comment #0)

> I have no idea what happens on linux/Mac.

The behavior on Mac (Safari, TextEdit) seems to be selecting the whole *word* under the pointer on right-click *mousedown*.
... which is what bug 365183 is about.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Severity: minor → S4
Duplicate of this bug: 1327886

Will be fixed in bug 1845241.

Assignee: nobody → masayuki
Status: REOPENED → ASSIGNED

The severity field for this bug is set to S4. However, the following bug duplicate has higher severity:

:masayuki, could you consider increasing the severity of this bug to S3?

For more information, please visit BugBot documentation.

Flags: needinfo?(masayuki)
Severity: S4 → S3
Flags: needinfo?(masayuki)
Priority: -- → P3

The new behavior is, right click (in strictly speaking, at mousedown), caret position is moved except when:

  1. You click when selection is not collapsed
  2. You click in editable content

However, you can also change #1 with ui.mouse.right_click.collapse_selection.stop_if_non_collapsed_selection pref. Then, right click outside selection collapses to the position except when clicked in the selected content.

Additionally, there is a ui.mouse.right_click.collapse_selection.stop_if_non_editable_node pref. This is set to false by default, but once set this to true, you can stop collapsing selection only when clicked position is not editable, this may be useful if you want to enable the new behavior only for "paste" command.

Status: ASSIGNED → RESOLVED
Closed: 8 years ago9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
You need to log in before you can comment on or make changes to this bug.