Last Comment Bug 528629 - Redo Undo both use keyboard shortcut COMMAND+Z in Mail message composition
: Redo Undo both use keyboard shortcut COMMAND+Z in Mail message composition
Status: RESOLVED FIXED
: fixed-seamonkey2.0.1
Product: SeaMonkey
Classification: Client Software
Component: MailNews: Composition (show other bugs)
: Trunk
: All Mac OS X
: -- normal (vote)
: seamonkey2.1a1
Assigned To: Stefan [:stefanh]
:
Mentors:
: 528628 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-13 15:06 PST by Cecelia S
Modified: 2009-11-29 09:43 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
possible patch (764 bytes, patch)
2009-11-15 15:54 PST, Stefan [:stefanh]
neil: superreview-
Details | Diff | Review
New approach (3.32 KB, patch)
2009-11-27 11:19 PST, Stefan [:stefanh]
neil: superreview+
Details | Diff | Review
Overlay key for linux (4.39 KB, patch)
2009-11-27 12:37 PST, Stefan [:stefanh]
no flags Details | Diff | Review
Even better (1.79 KB, patch)
2009-11-27 12:57 PST, Stefan [:stefanh]
mnyromyr: review+
neil: superreview+
mnyromyr: approval‑seamonkey2.0.1+
Details | Diff | Review

Description Cecelia S 2009-11-13 15:06:19 PST
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.23) Gecko/20090823 SeaMonkey/1.1.18 Mnenhy/0.7.5.0
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.23) Gecko/20090823 SeaMonkey/1.1.18 Mnenhy/0.7.5.0

Typical keyboard commands for Undo and Redo (with unlimited Undo) are COMMAND+Z for Undo and COMMAND+SHIFT+Z for Redo. This is the labeling in the browser component of SeaMonkey, but under Mail, the shortcuts are both COMMAND+Z. The COMMAND+Z/COMMAND+SHIFT+Z shortcuts work correctly in the subject line of the email, but not in the message area.

Reproducible: Always

Steps to Reproduce:
1. Compose mail message
2. Make several additions and deletions
3. Press COMMAND+Z a few times
Actual Results:  
Last edit is undone and redone.

Expected Results:  
Last few edits progressively undone.

I've filed the menu keyboard shortcut display as Bug#528628
Comment 1 Cecelia S 2009-11-13 15:11:28 PST
I just noticed that my build identifier is wrong. This is under SeaMonkey 2.0 (final release).
Comment 2 Stefan [:stefanh] 2009-11-15 14:44:22 PST
I guess we miss some overlay here...
Comment 3 Stefan [:stefanh] 2009-11-15 15:26:22 PST
Karsten, any idea what caused this? The only file I can see the right key combo in is platformCommunicatorOverlay
Comment 4 Stefan [:stefanh] 2009-11-15 15:52:04 PST
So... we get those keys from utilityOverlay.xul, it seems. That is overlayed by platformCommunicatorOverlay.xul.
Comment 5 Stefan [:stefanh] 2009-11-15 15:54:29 PST
Created attachment 412514 [details] [diff] [review]
possible patch

Not really tested this, just putting it here for reference
Comment 6 Stefan [:stefanh] 2009-11-17 13:39:45 PST
OK, so the <key/> in platformCommunicatorOverlay.xul doesn't work at all, but it does if I apply attachment #412514 [details] [diff] [review].
Comment 7 Stefan [:stefanh] 2009-11-17 13:43:34 PST
Comment on attachment 412514 [details] [diff] [review]
possible patch

I think there is more to do here - it's a bit of a mess with all the .dtd files. But this seems reasonable to me since I believe we want this on branch (no l10n impact).
Comment 8 Stefan [:stefanh] 2009-11-17 13:44:40 PST
We'll fix this on trunk first
Comment 9 Stefan [:stefanh] 2009-11-17 13:57:41 PST
*** Bug 528628 has been marked as a duplicate of this bug. ***
Comment 10 neil@parkwaycc.co.uk 2009-11-27 03:44:46 PST
Comment on attachment 412514 [details] [diff] [review]
possible patch

(As this patch stands, it looks like it breaks Linux builds.)

For some reason the key_redo attributes are being overlayed in the wrong order (i.e. the attributes from the platform overlay are getting applied first) and I have no idea why :s
Comment 11 neil@parkwaycc.co.uk 2009-11-27 07:47:11 PST
OK, so the issue seems to be the order of overlays.
messengercompose.xul includes the keyset from editorOverlay.xul that includes the key_redo element that utilityOverlay.xul overlays. However if utilityOverlay.xul is overlaid before editorOverlay.xul then its overlay temporarily misses. Now platformCommunicatorOverlay.xul is an overlay of an overlay, so it gets queued up after all of the main overlays, so that it does find the key_redo from editorOverlay.xul, but then when utilityOverlay.xul gets its second chance to overlay key_redo it overwrites the attributes that platformCommunicatorOverlay.xul set.
Comment 12 Stefan [:stefanh] 2009-11-27 11:19:01 PST
Created attachment 414863 [details] [diff] [review]
New approach

Thanks for the info, Neil.

On mac, the issue can be seen in the main mailnews window as well (see the dupe). Anyway, I switched the order of the overlays and it works fine for me. I think it makes sense to remove the attributes in utilityOverlay, since we're not really using them.
Comment 13 Stefan [:stefanh] 2009-11-27 11:19:43 PST
(like to keep this o the blocking radar, so it won't get lost)
Comment 14 neil@parkwaycc.co.uk 2009-11-27 12:07:28 PST
Comment on attachment 414863 [details] [diff] [review]
New approach

>diff --git a/suite/common/utilityOverlay.xul b/suite/common/utilityOverlay.xul
As I said already before, this change breaks Linux!

sr=me on the mailnews changes only.
Comment 15 Stefan [:stefanh] 2009-11-27 12:37:45 PST
Created attachment 414869 [details] [diff] [review]
Overlay key for linux

OK, if I haven't miunderstood you completely this would be better since then there won't be any confusion regarding what's overlayed and not. And this shouldn't break linux.
Comment 16 neil@parkwaycc.co.uk 2009-11-27 12:51:08 PST
Comment on attachment 414869 [details] [diff] [review]
Overlay key for linux

>+  <key id="key_redo"/>
No point just having this on its own.
Comment 17 Stefan [:stefanh] 2009-11-27 12:57:54 PST
Created attachment 414873 [details] [diff] [review]
Even better

Neil pointed out that I don't need the key in utilityOverlay anymore. This patch also skips the re-ordering of the overlays.
Comment 18 Karsten Düsterloh 2009-11-28 18:08:26 PST
Comment on attachment 414873 [details] [diff] [review]
Even better

Interestingly, shift^H does (and did) redo even under Linux, which I didn't know, becaus e it's not shown...
Comment 19 Stefan [:stefanh] 2009-11-29 04:47:19 PST
http://hg.mozilla.org/comm-central/rev/fb0d8c6fdd8d
Comment 20 Stefan [:stefanh] 2009-11-29 04:49:38 PST
Comment on attachment 414873 [details] [diff] [review]
Even better

I think we want this on 2.0.1 - it's a safe patch and the problem is highly visible for mac users.
Comment 21 Stefan [:stefanh] 2009-11-29 09:43:41 PST
Fixed for the forthcoming 2.0.1 release: http://hg.mozilla.org/releases/comm-1.9.1/rev/eb0b14ffe235

Note You need to log in before you can comment on or make changes to this bug.