Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 232420 - Usability: Editor has non standard Shift-Alt [Shift-Opt] LA RA selection behavior
Summary: Usability: Editor has non standard Shift-Alt [Shift-Opt] LA RA selection beha...
Status: VERIFIED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: 3.0   Edit
Hardware: All Mac OS X - Carbon (unsup.)
: P3 normal with 1 vote (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Nick Sandonato CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-15 17:58 EDT by Miles Parker CLA
Modified: 2009-05-08 18:27 EDT (History)
1 user (show)

See Also:


Attachments
keybinding fix (1.79 KB, patch)
2009-03-31 15:04 EDT, Nick Sandonato CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Miles Parker CLA 2008-05-15 17:58:21 EDT
1. Select text using the html editor.
2. Note that alt left and right arrow work as expected, e.g. move one word at a time. 
3. Select text with shift key and alt key, option key causes selection to immediately include all of immediate enclosing element.  

Expected behavior is for the enclosing word to be selected.

I believe that this is a fairly significant violation of the "principal of least surprise" as the expected behavior is the same for every other Eclipse platform editor, including XML. It trips me up every time I use the editor. :)

This behavior may be desired by some users, but if it is retained I'd suggest that it be made a non-default option in the HTML preferences.
Comment 1 Nitin Dahyabhai CLA 2008-07-07 21:13:01 EDT
Which other editors in Eclipse have you compared this to?  This is under "Expand Selection To" and then "Previous Element" in the Edit menu, which sounds like it's doing what it should.
Comment 2 Miles Parker CLA 2008-07-14 19:05:25 EDT
I think you're referring to the CTRL (M1) +SHIFT (M2) + ARROW behavior. I'm referring to ALT (M3) + SHIFT (M2) + ARROW.
Comment 3 Miles Parker CLA 2008-09-08 22:06:35 EDT
Any progress on verifying this? I'm seeing now that it is an issue with XML editor to so it seems more general to WTP.

As more justification, this also violates longstanding Mac HIG at least. When the shift key is applied, it should always act in the following way:

1. Mark beginning of selection.
2. Continue adding to selection until shift key or original key are released.
3. Otherwise, there should be no difference between the cursor behavior and what it would be without the shift key.

Put another way, there doesn't seem to be a natural way to select next element in these editors. Perhaps someone needs to try this w/ Mac and compare to other editors. I've up'd severity as this really makes these editors less useful than the text editor.
Comment 4 Miles Parker CLA 2008-10-22 19:31:21 EDT
I'm moving this over to wst.xml -- perhaps I'll get a response there.
Comment 5 Nick Sandonato CLA 2009-03-17 17:11:52 EDT
I'm familiar with the problem. One thing you can do to get around this in the meantime, is to Press Command + L twice to bring up the Keys preference page. Here, you can change the Select Next Element binding to something like Ctrl + Shift + RA and Select Previous Element to Ctrl + Shift + LA. This should free up the Shift+Alt+LA/RA bindings to act like you would expect.
Comment 6 Nick Sandonato CLA 2009-03-31 15:04:26 EDT
Created attachment 130444 [details]
keybinding fix

Added new keybindings for selecting the next and previous element.
Comment 7 Nick Sandonato CLA 2009-04-01 10:28:34 EDT
Released.
Comment 8 Miles Parker CLA 2009-04-01 19:45:36 EDT
Nick, you made my day. This one has been bugging me for almost a year now. Is / will this be on update site? (I have the Galileo milestone addie but can't find one for interim.)
Comment 9 Nick Sandonato CLA 2009-04-03 16:32:56 EDT
Hi Miles,

You can get the latest Milestone updates from the download site http://download.eclipse.org/webtools/milestones/.

WTP 3.1 M7 is currently targeted to be declared on May 8th 2009. So, you may have to wait a little bit before seeing it on the update site.
Comment 10 Miles Parker CLA 2009-05-08 18:27:39 EDT
Finally got the M7 download (update site isn't current yet) and it works! You've removed one of my greatest Eclipse annoyances. I'm marking as verified, hope that's appropriate for M release.