Closed Bug 38944 Opened 20 years ago Closed 19 years ago

bringing up context menu will change or make a new selection

Categories

(Core :: Selection, defect, P4)

PowerPC
Mac System 8.5
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: Brade, Assigned: cmanske)

References

Details

(Keywords: verifyme, Whiteboard: [nsbeta3+][p:4] macverifyme)

On Mac, when I bring up a context menu by control-clicking in Composer, the 
selection will sometimes change.  It seems to be anchoring itself to the 
beginning of the text and selecting up to the current mouse point.

Expectation:  no selection should take place when a context menu is being opened.
This makes context menus difficult to use... dogfood
Keywords: dogfood
Putting on [dogfood-] radar.  Please re-nominate if click and hold also does not 
work.
Whiteboard: [dogfood-]
m17
Target Milestone: --- → M17
updated priority and severity
Severity: normal → major
Priority: P3 → P2
nsEditorShellMouseListener is calling nsSelection::Collapse on right mouse down. 
is this corect? it is getting rid of previous selection.
Assignee: mjudge → cmanske
Keywords: dogfood
Whiteboard: [dogfood-]
Target Milestone: M17 → ---
setting milestone
Keywords: correctness, nsbeta3
Target Milestone: --- → M18
This was done temporarily -- I thought I filed a bug on anthonyd to add a new
method to support getting testing if the mouse is over existing selected text,
but I can't find that bug now.
This is needed for the EditorShellMouseListener so it can select objects 
only when not over an existing selection.
Currently, the selection is collapsed so links are detected when right-clicking
on one.
*** Bug 47089 has been marked as a duplicate of this bug. ***
setting to nsbeta3+
Severity: major → normal
Status: NEW → ASSIGNED
Priority: P2 → P4
Whiteboard: [nsbeta3+][p:4]
I found a method nsIDocument::IsInSelection() which should help solve the 
described problems.
In editor, since we don't have access to the code that determines the offset
of the cursor within a text node, we can't put the caret in the same place
as would occur with a left mouse click. The behavior now for the right mouse
click (Ctrl+Click on Mac) is:
If click inside an existing selection, don't change selection.
If click on an object (image, hline, named anchor...) not in current selection, 
select that object (moving the selection.)
If click in text that is not selected, change selection to a collapsed (caret)
at beginning of the text node. This is not optimal, but better than not 
changing the selection at all. 
Checked in 8/9.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
*SPAM*: Changing the QA contact of all open/resolved Selection bugs from 
elig@netscape.com to BlakeR1234@aol.com.  After the many great years of service 
Eli has given to Mozilla, it's time for him to move on; he has accepted a 
position at Eazel.  We'll be sad to see him go, and I'll do my best to fill his 
spot...
QA Contact: elig → BlakeR1234
Keywords: verifyme
Whiteboard: [nsbeta3+][p:4] → [nsbeta3+][p:4] macverifyme
verified with 090508 mozilla mac build on OS9
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.