Closed Bug 70154 Opened 24 years ago Closed 20 years ago

(ctrl)+shift+home/end should select to beginning/end of webpage

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: jruderman, Assigned: ginnchen+exoracle)

References

Details

(Keywords: access)

Attachments

(1 file, 1 obsolete file)

Shift+Home and Ctrl+Shift+Home should select to the beginning of the document 
in Navigator.  Currently Shift+Home selects to the beginning of the line (even 
though Home jumps to the top of the page) and Ctrl+Shift+Home doesn't do 
anything.

Similarly for End.
Forgot to mention: these shortcuts work best if you click inside text first.  
The insertion point is invisible but still works.
design issue, reassign to aaronl
Assignee: alecf → aaronl
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla1.1
I'm surprised that users would actually want this functionality given there isn't 
an obvious caret in the browser.
Summary: (ctrl)+shift+home/end should select to beginnig/end of webpage → (ctrl)+shift+home/end should select to beginning/end of webpage
Blocks: 100741
this bug doesnt seem relevant since it does in fact work in email composition
and <textarea> widgets, just not on a webpage.
Perhaps this should be marked invalid ?
This is going to be important for "Browse with caret" mode that I'm working on.
That allows keyboard-only users to select and copy text.
*** Bug 161923 has been marked as a duplicate of this bug. ***
I created attachment 94635 [details] [diff] [review] to bug 161923 as a patch just for Windows because I
didn't think that those keys were used in other OSes.
r=brade on that attachment
On windows I find the common function for shift+home is to bring the selection
caret to the beginning of the line as opposed to the beginning of a document.
For comparison, here are text selection keyboard shortcuts for Mozilla textfields:

Ctrl+A           = Select all.
Shift+Right      = Expand selection by a character.
Ctrl+Shift+Right = Expand selection to the end of a word.
Shift+End        = Expand selection to the end of a line.
Ctrl+Shift+End   = Expand selection to the end of a textfield.

In an html document (outside of textfields and textareas) I can use keyboard
shortcuts for text selection after I initially select a word in a document by
double clicking on a word with a cursor. Once I have a portion of the html
document selected, I can expand text selection with all of the above keyboard
shortcuts with the exception of Ctrl+Shift+End.

Same situation when left/right, home/end is switched.
Should fix at the same time as bug 244953.
Target Milestone: mozilla1.1alpha → mozilla1.9alpha
How about this?

Caret browsing off:
Home, End scroll to top/bottom without changing horizontal position.
Ctrl+Home, Ctrl+End scroll horizontally to beginning or end without changing
vertical position 

Caret browsing on:
Home, end move caret to beginning/end of line as it does now
Ctrl+Home, Ctrl+End move caret to very beginning or end of doc

Either:
Ctrl+Shift+Home, Ctrl+Shift+End
Select to beginning/end of doc

Agreements? Disagreements?
Keywords: access
See also bug 143996
Blocks: caretnav
Attached patch patch (obsolete) — Splinter Review
The command name in platformHTMLBindings.xml is cmd_selectTop/cmd_selectBottom
not cmd_selectMoveTop/cmd_selectMoveButtom.
So we need correct /dom/src/base/nsGlobalWindowCommands.cpp

Q: Should we correct /camino/src/embedding/CHBrowserView.mm?
Assignee: aaronleventhal → ginn.chen
Attachment #172420 - Flags: review?(aaronleventhal)
Comment on attachment 172420 [details] [diff] [review]
patch

I'm unclear why you want to rename these commands.  Just to be compatible with
the same command names in the xml or is something broken?

I'm ok with the name changes but you will need to change Camino so it doesn't
have a regression which means that you'll need Simon Fraser or Mike Pinkerton
to give approval.

r- since this patch (as it is) is incomplete.
Attachment #172420 - Flags: review?(aaronleventhal) → review-
(In reply to comment #14)
>(From update of attachment 172420 [details] [diff] [review] [edit])
>I'm unclear why you want to rename these commands.  Just to be compatible with
>the same command names in the xml or is something broken?
It appears that nsGlobalWindowCommands is inconsistent as the rest of Mozilla
(nsEditorCommands, nsNativeKeyBindings etc.) uses cmd_selectTop/Bottom.
Attachment #172420 - Attachment is obsolete: true
Attachment #172548 - Flags: review?(brade)
Comfirmed, the first patch will break Camino.
Thanks, brade.

I've tested the second patch on my build Camino.

It works well.
Comment on attachment 172548 [details] [diff] [review]
patch (include camino)

r=brade but it needs module owner permission; asking smfr but pink can also
approve.
Attachment #172548 - Flags: superreview?(sfraser_bugs)
Attachment #172548 - Flags: review?(brade)
Attachment #172548 - Flags: review+
OS: Windows 98 → All
Hardware: PC → All
Attachment #172548 - Flags: superreview?(sfraser_bugs) → superreview+
Checking in dom/src/base/nsGlobalWindowCommands.cpp;
/cvsroot/mozilla/dom/src/base/nsGlobalWindowCommands.cpp,v  <-- 
nsGlobalWindowCommands.cpp
new revision: 1.15; previous revision: 1.14
done
Checking in camino/src/embedding/CHBrowserView.mm;
/cvsroot/mozilla/camino/src/embedding/CHBrowserView.mm,v  <--  CHBrowserView.mm
new revision: 1.51; previous revision: 1.50
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Component: Keyboard: Navigation → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: