Closed Bug 40796 Opened 26 years ago Closed 24 years ago

Context menu needs to set focus to 'ghost' (grayed, lost-focus) selections, clipboard operations must work

Categories

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

x86
Windows 98
defect

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: bugzilla, Assigned: saari)

Details

(Whiteboard: [nsbeta3-])

Build ID: 2000052608 [anthonyd: feel free to take this one if you want it, per your tracking of bug 36848] This is split off from bug 36848. Steps to Reproduce: (1) Visit any webpage, i.e. http://www.mozilla.org (2) Highlight any text in the webpage you've visited. (2) Highlight any text in the URL bar. At this point, your selection in the content area should have turned gray (thus, it is a 'ghost' selection) (3) Right-click on your now-gray selection in the content area. Expected Results: selection 'focus' switches from the selection in the url bar to the selection in the content area. In other words, the selection in the URL bar should turn gray, and the selection in the content area needs to revert back to the "focused" color (typically blue, but may vary depending on your system defaults). When the selection in the content area becomes the active one, the common clipboard functions in the context menu (namely just Copy if in the browser, or Cut, Paste, Clear, etc. in Composer) need to apply to that function. Actual Results: A context menu does appear, but focus doesn't switch from the URL bar selection to the content area selection. Thus, while a context menu DOES appear (as it should) when right-clicking on the ghosted selection, its clipboard functions don't work with relation to the ghosted text (in fact, they don't seem to function at all - they don't even perform the selected operation with the highlighted text in the URL bar). For example, in the browser, the Copy item becomes immediately disabled upon mousedowning on it. I was going to file separate bugs, one for making the 'ghosted' selection active and focused when right-clicking on it and one for having the native clipboard functions work with the ghosted selection, with dependencies to each other. However, upon further reconsideration, it seems to me that if the content area selection becomes the active one upon right-click before the context menu is called, the rest will be handled automatically (since the right selection will have the focus before the instance of the menu is called). If I was a little unclear about something, please don't hesitate to ask :) This is quite a long report for a fairly simple task - switch selection 'focus' to whatever selection you're right-clicking on so the context menu clipboard operations work.
setting to m17 and assigning to Tony
Assignee: mjudge → anthonyd
Target Milestone: --- → M17
Accepting this one, and will investigate. Anthony
Status: NEW → ASSIGNED
Any work done on this, yet?
setting milestone to m18.
Target Milestone: M17 → M18
adding eli
setting the keywords and status
Keywords: correctness, nsbeta3
Whiteboard: nsbeta3+
how is this bug related to bug #28508?
*** Bug 45909 has been marked as a duplicate of this bug. ***
cc:sujay
setting priority in status whiteboard - medium
Whiteboard: nsbeta3+ → [nsbeta3+][p:3]
I think cmanske has a duplicate of this bug, so I'm adding him to the cc list.
Okay, I've gotta know... why do whe have this dual selection scheme? Things like focus and selection are meant to be singular things in a UI. I'm just thinking that patching selection/focus to deal with this is the wrong approach. Right clicking shouldn't be setting focus or activating selection. We're going to cause more bugs this way. Make selection singular. Just my 2 cents.
Saari: I was just about to file a new, general bug (which would encapsulate this one) that right click should act as left click on whatever widget the cursor is over before the context menu pops up...I just noticed your comment, though. Why do you think that shouldn't be the case? afaik, that's the standard on windows. For example, if you click on a widget in IE's viewport, and then right click on the URL bar, focus is first set to the URL bar (thus the click goes through), and THEN the context menu appears (which items that relate to the widget over which you clicked...in this example, the URL bar).
*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
Worked with saari on this for a couple of days, and we are close to a fix. I am reassigning this to him for his big finish!!! anthony
Assignee: anthonyd → saari
Status: ASSIGNED → NEW
Chris, when you're portion is completed, please reassign back to anthonyd for the final bits -- thanks
marking dup of 48838 *** This bug has been marked as a duplicate of 48838 ***
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → DUPLICATE
vrfy dup
Status: RESOLVED → VERIFIED
hmm..spoke a bit soon. While this works most of the time, there are cases when it doesn't: (1) Go to any website (2) Drag a link into the website (such that the cursor is the 'no-drop'), and then drop it. (3) Select text (note that it's gray/unfocused, which is a separate bug) (4) Right click on the selection Note that the text doesn't turn blue/focused. I suspect this is some kind of focus issue. Renominating for beta3, I don't think this is worthy of + anymore.
Status: VERIFIED → REOPENED
Resolution: DUPLICATE → ---
Whiteboard: [nsbeta3+][p:3]
Yeah, I'm going to future this... there are all sorts of uncommon combinations that can still confuse selection.
Target Milestone: M18 → Future
I agree, nsbeta3-
Status: REOPENED → ASSIGNED
Whiteboard: [nsbeta3-]
changing selection qa to tpreston.
QA Contact: blaker → tpreston
removing myself from the cc list
WFM. Right-clicking anywhere in the content area makes the selection blue again, and "Copy" works.
WFM.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago → 24 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.