Bug 996398

Summary: [Review comment dialog] The keyboard shortcut mistakenly work on the main translation editor
Product: [Retired] Zanata Reporter: Ding-Yi Chen <dchen>
Component: UsabilityAssignee: Patrick Huang <pahuang>
Status: CLOSED CURRENTRELEASE QA Contact: Ding-Yi Chen <dchen>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.0CC: lbrooker, pahuang, sflaniga, zanata-bugs
Target Milestone: ---   
Target Release: 3.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 3.1-SNAPSHOT (20130913-1232) Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 996446 (view as bug list) Environment:
Last Closed: 2013-11-27 03:24:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ding-Yi Chen 2013-08-13 06:34:45 UTC
Description of problem:
When entering the review comment in review comment dialog, the only keyboard shortcut that should work is:

  Control-Enter: Confirm rejection

Some input method may clash with "Esc" (Japanese input methods and ibus-chewing), so no shortcut for "Cancel".

However, keyboard shortcut like "Ctrl-Enter" are mistakenly apply on the "background" translation editor.



Version-Release number of selected component (if applicable):
Zanata version 3.0.0-alpha-2-SNAPSHOT (20130813-1420)

How reproducible:
Always

Steps to Reproduce:
1. Go to translation editor
2. Click Reject icon on any of the non-empty translation.
3. Click to focus on the "Add a comment" text area
4. Press Ctrl-Enter

Actual results:
Save as Translated as if the review comment dialog was not there.

Expected results:
Save the comment and close the review comment dialog.

Additional info:

Comment 1 Patrick Huang 2013-09-06 02:02:58 UTC
https://github.com/zanata/zanata-server/pull/147

Comment 2 Sean Flanigan 2013-09-06 04:46:51 UTC
Do we need this fix in 3.0?

Comment 3 Ding-Yi Chen 2013-09-13 04:10:05 UTC
Tested with Zanata version 3.1-SNAPSHOT (20130913-1232).

The keyboard shortcut won't affect main translation editor now, However, if reviewer press Esc before confirm rejection, then the comment counter won't show up.


Step to reproduce:
1. Go to translation editor view
2. Find or make a Translated message.
3. Click *Reject*
4. Type "No"
5. Press key "Escape"
6. Click Confirm rejection

Actual:
The message was marked as reject, but comment counter is not shown.

Expected: 
The message was marked as reject, AND comment counter shows that you have 1 comment.

Additional Info:
The comment is in translation history though.

============
I hereby reassign this bug, but feel free to open another bug to address the above problem.

Comment 4 Ding-Yi Chen 2013-09-13 05:53:17 UTC
After further testing, this bug occurred in Firefox 17.0.8, but not Chrome/Chromium.

Comment 5 Patrick Huang 2013-09-15 23:00:24 UTC
The indicator doesn't appear at all in Firefox. No need to press Esc to trigger it. Seems to be a style issue?

Comment 6 Patrick Huang 2013-09-15 23:09:20 UTC
Looks like the count didn't get set correctly. I will look into it

Comment 7 Patrick Huang 2013-09-16 00:48:24 UTC
Ok this is surprising. Whenever you press ESC in Firefox, you close off GWT event service connection. That means, you won't get any update from other people in the workspace. The comment count happens to use TransUnitUpdated event from event service therefore the count didn't get updated. Google search suggested that Firefox seems to have a track record of binding ESC key to some events that will surprise people.
1. https://bugzilla.mozilla.org/show_bug.cgi?id=614304
2. https://bugzilla.mozilla.org/show_bug.cgi?id=524360

1 is the root cause of our bug and they are still arguing whether FF should fix it. For the time being, we could only workaround it in our app. For example, listen to ESC and preventDefault. May not be ideal though.

Comment 8 Patrick Huang 2013-09-16 00:49:20 UTC
I will fire a separate bug for the FF ESC key binding surprise. This bug should not be blocked by that.

Comment 9 Ding-Yi Chen 2013-09-16 06:22:21 UTC
VERIFIED with Zanata version 3.1-SNAPSHOT (20130913-1232) with Chromium 27.0.1453.93 and Firefox without pressing "Esc".

Note that Firefox still suffer from Bug 1008253,
step to reproduce in comment #3 still true.

Comment 10 Sean Flanigan 2013-11-27 03:14:34 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 11 Sean Flanigan 2013-11-27 03:16:19 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 12 Sean Flanigan 2013-11-27 03:18:00 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 13 Sean Flanigan 2013-11-27 03:24:17 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 14 Sean Flanigan 2013-11-27 03:32:40 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 15 Sean Flanigan 2013-11-27 03:34:56 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.