Closed Bug 87321 Opened 24 years ago Closed 22 years ago

[Access] Shift+Tab has duplicate behavior (event handled twice)

Categories

(MailNews Core :: Composition, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.2alpha

People

(Reporter: kmurray1115, Assigned: neil)

References

Details

Attachments

(1 file, 4 obsolete files)

Using 0.9.1 (commercial build PR1) on Win2K: In Mail compose, when editing a bulleted list item, and using shift+tab to outdent, the caret does the following *two* things: 1. outdents the list item 2. jumps back to the subject field Expected behavior: When outdenting list items using Shift+tab, we should disable #2 above, but contextually allow #1.
Component: Editor → Mail Window Front End
Product: Browser → MailNews
off to the mail team
changed owner
Assignee: beppe → sspitzer
QA Contact: sujay → esther
OK, this makes HTML message compose completely suck for lists. There is, however, a pretty simple workaround. Shift+Tab will outdent and focus subject field. Hitting Tab will return focus to the last outdented position. So Shift+tab then Tab gets you what you want.
An additional workaround is to hit Enter to outdent (instead of Shift+Tab).
Keywords: nsBranch
Blocks: 99230
not a stop ship bug for eMojo
Keywords: nsbranchnsbranch-
Target Milestone: --- → mozilla0.9.6
No longer blocks: 99230
moving to 0.9.7 and reassigning to varada.
Assignee: sspitzer → varada
Target Milestone: mozilla0.9.6 → mozilla0.9.7
Keywords: nsbeta1
Blocks: 107067
Keywords: nsbranch-
Keywords: nsbeta1nsbeta1+
Target Milestone: mozilla0.9.7 → mozilla0.9.9
Priority: -- → P2
This can be argued in another way - The user might want Shift-Tab to get from the Message Text to the Subject line and not just do a outdent. It is confusing to have one action do two things. Why dont we decide on one or the other and give different keys for the two?
Status: NEW → ASSIGNED
Copying Aaronl and JGlick. Comments?
I agree with Varada.
If the necessary Accessibility keys can be decided on then we can try to get the fix in for this deadline. Can the folks in charge of that decide and agree on the keys by today?
Editor folks need to agree and Aaron would need to suggest an available accelerator.
So, is it correct that Accel+plus/minus are taken, as well as Accel+[/]? Here are some not so perfect, but usable, possibilities: 1. change the behavior of Tab/Shift+tab only when text is selected and in an editor control. 2. accel+9/0 -- these should be i18n, and on English keyboards at least, they're the unshifted versions of ( and ) 3. Alt+brackets or Alt+plus/minus
my original vote was for option #1. Still is.
Target Milestone: mozilla0.9.9 → mozilla1.0
I think we need to reach some sort of accord so that we can go ahead and start implementing this. Can anyone take the lead on this? Jennifer?
At some point that pre-dates me, the editor team changed the indent/outdent accelerators from ctrl+/ctrl-(4.x) to tab/shift+tab. That might have been Ok if they didn't also add support for the same outcome via ctrl+]/ctrl+[ (try it, they both work!). So, why don't we go back to ctrl+/ctrl- as the accelerators for indent/outdent, and reserve tab/shift+tab for bouncing between fields? If someone has a specific alternative recommendation, please state it soon so we can progress. Varada, if you don't hear an alternative recommendation by EOD Wednesday, 2/27, go ahead and implement the scenario I suggested.
Sounds good to me.
In Composer, here are some of the the current mappings: control-+ (control-=) --> larger font size control-- --> smaller font size control-[ --> outdent control-] --> indent tab --> used to navigate table cells and indent list items shift-tab --> used to navigate table cells and outdent list items (notice we have problems here if you have a list in a table!) Note: only tab and shift-tab are accessible on a European (or non-US) keyboard. To me (a developer), the *big* issue here is that the event is handled twice (not that it is getting handled by the wrong widget). That issue needs to be investigated ASAP (who is ignoring flag, focus? editor?) Next, if after the previous issue is addressed, there is still a problem (editing widget handles tab instead of focus), then we'll probably need to special case the tab and shift-tab key events in editor code to not do what they do in Composer if certain conditions (flags?) are met. By the way, in Netscape 6.2, Composer handled the tab (focus wasn't changed)
Summary: [Access] Shift+Tab has duplicate behavior → [Access] Shift+Tab has duplicate behavior (event handled twice)
Composer has bug 98624 to deal with the VERY messy issue of tab key behavior. It is grossly overloaded. IMHO, using it to change focus from editing window to other parts of Mail Composer UI is absolutely the LAST thing it should be used for.
So where do go from here?
Given the info from brade, we should remove the ability to use tab to indent and shift-tab to outdent. We already have an accelertator to do that (ctrl]/ctrl[). Charlie, I understand your position, but we've made a broader decision to use tab to move from element to element in the browser, and considerable work has been done in the mail three pane window to tab from elememt to element there. the natural extension of that in mail compose is to use tab to move from element to element there and use ctrl+* within the message body to perform indent/outdent operations. Go for it varada. KM
Kevin--I think that is entirely the wrong thing to do. Control-[ and Control-] (as well as -,=, and +) are *not* international-friendly. Those keybindings can't be used *AT ALL* on non-US keyboards. We really should be moving away from *ALL* of those (at least until we have configurable keybindings which won't happen for quite some time). I think the right thing to do is find out why the event is getting handled twice. Once we know what's going on there and address that issue, we can decide how to proceed (possibly disabling tab key editing functions in mail compose only). Honestly, I *really* believe that it is getting late to be changing *ANY* of this stuff without introducing risks of huge regressions. This bug is more of an RFE/enhancement than a bug. (Prior versions of Mail Compose only allowed for users to reverse tab to get out of editing area.) Varada--please let me know if you need help debugging the event stuff. If we can't nail that it's pointless to try to fix this bug since someone else may "fix" a bug and cause any band-aid fix we do to regress in a worse way.
Control-[ and Control-] (as well as -,=, and +) are *not* international-friendly. Somebody made the decision to support that without regard for international then. So what's the low-cost and quick solution to this? I think the right thing to do is find out why the event is getting handled twice. Once we know what's going on there and address that issue, we can decide how to proceed (possibly disabling tab key editing functions in mail compose only). Sure - if it gets us where we need to be quickly, fine. But what we don't have the luxury of doing is investigating this well outside the scope of 1.0. Absent the ability to make real headway on solving the tough issues you cite above, we should remove the redundancy.
i think that we could alter the behavior of ctrl+[shift+]arrows so that they walked words and nodes. leaving [shift+]tab for indentation. but i'm still trying to puzzle this through.
I don't see the "double-behavior" any more. Does anyone else?
nevermind; I was testing the wrong thing; I do see the problem
OK, I checked... Composer gets the event and handles it. It correctly sets the "event handled" flag. The bug is coming later in focus when focus isn't paying attention to the "handled" flag. AaronL--do you know anything about this stuff or do we need to ship this bug off to Chris Saari?
OS: Windows 2000 → All
Hardware: PC → All
removing myself from the cc list
Chris Saari--I think your expertise is needed here. Aaron can't help with this bug right now. :-( Varada--you should probably reassign this bug to Chris Saari or talk to him and see if there is a better person to reassign this to.
nsbeta1- as per ADT
Keywords: nsbeta1+nsbeta1-
Target Milestone: mozilla1.0 → mozilla1.2
Hi, what I would do is: a single Shift+Tab outdents the list. If, after that, the next keystroke were another Shift+Tab, it would return to the Subject field. I think it's better not to send the user away while he/she's typing the mail...
taking all of varada's bugs.
Assignee: varada → sspitzer
Status: ASSIGNED → NEW
*** Bug 84454 has been marked as a duplicate of this bug. ***
*** Bug 179250 has been marked as a duplicate of this bug. ***
*** Bug 187253 has been marked as a duplicate of this bug. ***
As a reminder, bug 179250 (and possibly others) was about another case: when editing a message without any list, Shift-Tab gets back to the subject (:-)) but add a Tab in the message body (:-(). With obvious workaround of going back to the editor and removing the inserted Tab (with Back, for example).
Attached file diff -uw (obsolete) —
Attached patch Proposed patch (obsolete) — Splinter Review
Attachment #112410 - Flags: superreview?(alecf)
Attachment #112410 - Flags: review?(ducarroz)
Comment on attachment 112410 [details] [diff] [review] Proposed patch I'll let sspitzer do the review as I am too busy right know...
Attachment #112410 - Flags: review?(ducarroz) → review?(sspitzer)
brade thinks I need a couple of extra lines: + if (isShift) + return NS_OK; // don't type text for shift tabs } else if (keyCode == nsIDOMKeyEvent::DOM_VK_RETURN || keyCode == nsIDOMKeyEvent::DOM_VK_ENTER) { + aKeyEvent->PreventDefault(); nsString empty; if (isShift && !(mFlags&eEditorPlaintextMask)) { @@ -1346,6 +1352,7 @@ } else if (keyCode == nsIDOMKeyEvent::DOM_VK_ESCAPE) { + aKeyEvent->PreventDefault(); // pass escape keypresses through as empty strings: needed forime support nsString empty; return TypedText(empty, eTypedText);
Fixing component.
Assignee: sspitzer → ducarroz
Component: Mail Window Front End → Composition
Comment on attachment 112410 [details] [diff] [review] Proposed patch let's get a review from brade first, then I can sr.
Attachment #112410 - Flags: superreview?(sspitzer)
Attachment #112410 - Flags: superreview?(alecf)
Attachment #112410 - Flags: review?(sspitzer)
Attachment #112410 - Flags: review?(brade)
re-assign to neil.
Assignee: ducarroz → neil
Comment on attachment 112410 [details] [diff] [review] Proposed patch r=brade with the addition of the changes in comment 39
Attachment #112410 - Flags: review?(brade) → review+
Comment on attachment 112410 [details] [diff] [review] Proposed patch sr=sspitzer, once you make brade's requested changes. can you attach that final path to this bug, for completeness?
Attachment #112410 - Flags: superreview?(sspitzer) → superreview+
Attachment #112409 - Attachment is obsolete: true
Attachment #112410 - Attachment is obsolete: true
Comment on attachment 112974 [details] [diff] [review] Patch incorporating review comments for completeness /me wishes there was an easier way to transfer r/sr
Attachment #112974 - Flags: superreview?(sspitzer)
Attachment #112974 - Flags: review?(brade)
Attachment #112974 - Flags: approval1.3b?
Attachment #112974 - Flags: review?(brade) → review+
Comment on attachment 112974 [details] [diff] [review] Patch incorporating review comments for completeness sr=sspitzer, assuming tab and shift tab still do the right thing in the other scenarios.
Attachment #112974 - Flags: superreview?(sspitzer) → superreview+
Neil--I have your patch in my current tree and I just ran into a problem: inside a table in Composer, press tab expectation: move to next table cell actual result: 4 spaces inserted I have lots of patches in my tree but yours seems like an obvious candidate for this regression. Can you verify that tabbing in lists and tables works with your patch? Thanks!
Attached patch Fixed missing ! (obsolete) — Splinter Review
You're right, when I split up the condition I missed off a ! by mistake... Testing this, I found an issue with shift+tab in editor, so I added a fix.
Attachment #112974 - Attachment is obsolete: true
Comment on attachment 113090 [details] [diff] [review] Fixed missing ! The ! was missing on this line: >+ if (!(mFlags & eEditorPlaintextMask)) {
Attachment #113090 - Flags: superreview?(sspitzer)
Attachment #113090 - Flags: review?(brade)
Attachment #112974 - Flags: approval1.3b?
Comment on attachment 113090 [details] [diff] [review] Fixed missing ! I know this was in the old code but I'd like to see it fixed for consistency. For PRBool assignments, I prefer this format: PRBool isBlock = PR_FALSE; instead of: PRBool isBlock (PR_FALSE); What is the new change in editor.xul? What issue does that fix? I'd prefer not to make that change unless it fixes a known issue.
waiting for r=brade before I sr.
Comment on attachment 113090 [details] [diff] [review] Fixed missing ! r=brade IF the change to editor.xul include a check to only call event.preventDefault() if the keypress is a tab. I'm worried about regressions for other keys which we don't want to handle.
Attachment #113090 - Flags: review?(brade) → review+
onkeypress="if (event.keyCode == KeyEvent.DOM_VK_TAB) event.preventDefault();"
Attachment #113392 - Flags: superreview?(sspitzer)
Attachment #113392 - Flags: review?(brade)
Comment on attachment 113090 [details] [diff] [review] Fixed missing ! oops, forgot to mark obsolete
Attachment #113090 - Attachment is obsolete: true
Attachment #113090 - Flags: superreview?(sspitzer)
Comment on attachment 113392 [details] [diff] [review] brade was right, I was too hasty :-[ r=brade
Attachment #113392 - Flags: review?(brade) → review+
Comment on attachment 113392 [details] [diff] [review] brade was right, I was too hasty :-[ sr=sspitzer
Attachment #113392 - Flags: superreview?(sspitzer) → superreview+
Comment on attachment 113392 [details] [diff] [review] brade was right, I was too hasty :-[ a=asa (on behalf of drivers) for checkin to 1.3beta.
Attachment #113392 - Flags: approval1.3b+
Fix checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: