Bug 996398 - [Review comment dialog] The keyboard shortcut mistakenly work on the main translation editor
[Review comment dialog] The keyboard shortcut mistakenly work on the main tra...
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Usability (Show other bugs)
3.0
Unspecified Unspecified
unspecified Severity urgent
: ---
: 3.1
Assigned To: Patrick Huang
Ding-Yi Chen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-13 02:34 EDT by Ding-Yi Chen
Modified: 2013-11-26 22:34 EST (History)
4 users (show)

See Also:
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-26 22:24:17 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ding-Yi Chen 2013-08-13 02:34:45 EDT
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-05 22:02:58 EDT
https://github.com/zanata/zanata-server/pull/147
Comment 2 Sean Flanigan 2013-09-06 00:46:51 EDT
Do we need this fix in 3.0?
Comment 3 Ding-Yi Chen 2013-09-13 00:10:05 EDT
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 01:53:17 EDT
After further testing, this bug occurred in Firefox 17.0.8, but not Chrome/Chromium.
Comment 5 Patrick Huang 2013-09-15 19:00:24 EDT
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 19:09:20 EDT
Looks like the count didn't get set correctly. I will look into it
Comment 7 Patrick Huang 2013-09-15 20:48:24 EDT
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-15 20:49:20 EDT
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 02:22:21 EDT
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-26 22:14:34 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 11 Sean Flanigan 2013-11-26 22:16:19 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 12 Sean Flanigan 2013-11-26 22:18:00 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 13 Sean Flanigan 2013-11-26 22:24:17 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 14 Sean Flanigan 2013-11-26 22:32:40 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 15 Sean Flanigan 2013-11-26 22:34:56 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.

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