Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1103947 - [Translation Editor] Dialog "Invalid translation" failed to obtain input focus.
[Translation Editor] Dialog "Invalid translation" failed to obtain input focus.
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Retired
Component: Component-UI (Show other bugs)
3.4
Unspecified Unspecified
unspecified Severity high
: ---
: 3.4
Assigned To: Alex Eng
Ding-Yi Chen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-02 20:57 EDT by Ding-Yi Chen
Modified: 2014-07-17 02:39 EDT (History)
2 users (show)

See Also:
Fixed In Version: 3.4.2-SNAPSHOT (git-server-3.4.1-16-gcaeed7b)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-07-17 02:39:45 EDT
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)
Screenshot: Dialog "Invalid Translation" failed to get focus (99.98 KB, image/png)
2014-06-02 21:15 EDT, Ding-Yi Chen
no flags Details
Screen cast of bug reproduced in Chrome (6.57 MB, video/ogg)
2014-06-09 22:03 EDT, Ding-Yi Chen
no flags Details

  None (edit)
Description Ding-Yi Chen 2014-06-02 20:57:28 EDT
Description of problem:
After user entered an invalid translation, a dialog "You are trying to save an invalid translation" poped up.

However, the page was dimmed, and the dialog did not get input focus.
Consequently, translator could do nothing other than press 'Esc' to close the dialog.

Version-Release number of selected component (if applicable):
Zanata 3.5.0-SNAPSHOT (git-server-3.4.1-52-g47cdeb5)
Firefox 24.4.0

How reproducible:
Easy always with Firefox

Steps to Reproduce:
1. Log in as a project maintainer or admin.
2. Go to project setting -> translation, and change the validation of Leading/trailing newline (\n) to "Error"
3. Go to any version, any language, any document
4. In any entry, trigger an error by adding an additional newline in the end of string.
5. Save as translated by clicking at the save button.
6. Click "Return to editor"
7. Click "Save as fuzzy"

Actual results:
 After 5: 
   Dialog "You are trying to save an invalid translation" was dimmed.
   Layer of dialog was not on the top. (See attachment)
  

 After 6: Nothing happened
 After 7: Nothing happened
  

Expected results:
 After 5: 
   Dialog "You are trying to save an invalid translation" should be emphasized..
   Layer of dialog should be on the tup
  
 After 6: Should be returned to the entry that trigger error.
 After 7: The entry should be saved as fuzzy.


Additional info:
1. Temporary workaround: Press 'Esc' to return to editor.
2. This bug also shown in Chrome, but occasionally.
Comment 1 Ding-Yi Chen 2014-06-02 21:15:53 EDT
Created attachment 901553 [details]
Screenshot: Dialog "Invalid Translation" failed to get focus
Comment 2 Ding-Yi Chen 2014-06-02 21:26:35 EDT
Tested with Chrome 35.0.1916.114

Steps to reproduce in Chrome:
1-5 are same with firefox.
After 5. it may seems it as if it was saving the entry (but it was not).

6. Click the entry that trigger the error.

7. Save as translated.

After step 7, the symptom is same with firefox.
Comment 3 Alex Eng 2014-06-03 02:25:22 EDT
Pull request:
https://github.com/zanata/zanata-server/pull/485
Comment 4 Ding-Yi Chen 2014-06-05 04:06:19 EDT
Tested with Zanata 3.4.2-SNAPSHOT (git-server-3.4.1-7-g1ed6db1):

With Firefox 24.4.0:
Button "Return to editor" does not work"


With Chrome 35.0.1916.114
1. Button "Return to editor" does not work"
2. "Save as Fuzzy" bring you back to the entry, but it does not save as fuzzy,
   and you cannot leave the entry even if you saved as fuzzy.
3. The first entry that trigger the error still showing as it is saving.


I also found that set newline checking as "ERROR" does not trigger an ERROR, it still a warning. But that should be tracked in other bug.

Please use "Positional printf (XSI extension)"  to trigger the error.

Reassigned.
Comment 5 Ding-Yi Chen 2014-06-05 21:59:12 EDT
The newline not showing error bug is tracked with Bug 1105375.
Comment 6 Alex Eng 2014-06-09 18:00:29 EDT
Tested from https://github.com/zanata/zanata-server/pull/485 seems alright. Can you let me know where did you get the WAR file from?
Comment 8 Ding-Yi Chen 2014-06-09 20:48:12 EDT
Tested with Zanata 3.4.2-SNAPSHOT (git-server-3.4.1-7-g1ed6db1) 

With Firefox 24.4.0:
Button "Return to editor" does work, but it tooks 4.7 seconds on my local machine for it to disappear. It might be worse in production server.
Otherwise it is good.


With Chrome 35.0.1916.114
1. If you trigger an invalid Error the first time on the session,
   it shows "Saving...", but it is not actually saving, and validator failed to 
   show the "Invalid translation" Dialog.
  
   The javascript console shows following error:

(-:-) 2014-06-10 10:40:48,476 [FATAL] uncaught exception
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at Unknown.$collect(JsArrayString.java:42)
    at Unknown.fillInStackTrace_3(StackTraceCreator.java:174)
    at Unknown.fillInStackTrace_1(StackTraceCreator.java:501)
    at Unknown.fillInStackTrace(Throwable.java:72)
    at Unknown.$$init_12(Throwable.java:46)
    at Unknown.Throwable_1(Throwable.java:52)
    at Unknown.Exception_1(Exception.java:29)
    at Unknown.RuntimeException_1(RuntimeException.java:29)
    at Unknown.IndexOutOfBoundsException_1(IndexOutOfBoundsException.java:29)
    at Unknown.indexOutOfBounds(AbstractList.java:191)
    at Unknown.checkIndex(AbstractList.java:183)
    at Unknown.$get_8(ArrayList.java:157)
    at Unknown.get_32(ArrayList.java:156)
    at Unknown.$onSuccess_32(TransUnitSaveService.java:202)
    at Unknown.onSuccess_35(TransUnitSaveService.java:200)
    at Unknown.$onSuccess_30(SeamDispatchAsync.java:97)
    at Unknown.onSuccess_33(SeamDispatchAsync.java:96)
    at Unknown.onResponseReceived(RequestCallbackAdapter.java:232)
    at Unknown.$fireOnResponseReceived(Request.java:287)
    at Unknown.onReadyStateChange(RequestBuilder.java:395)
    at Unknown.anonymous(XMLHttpRequest.java:351)
    at Unknown.apply_3(Impl.java:189)
    at Unknown.entry0(Impl.java:242)
    at Unknown.anonymous(Impl.java:70)

2. Save to fuzzy failed to save the invalid as fuzzy, nor it is display properly.
Comment 9 Ding-Yi Chen 2014-06-09 22:03:26 EDT
Created attachment 906801 [details]
Screen cast of bug reproduced in Chrome

Screen cast of bug reproduced in Chrome
Comment 10 Ding-Yi Chen 2014-06-10 20:45:57 EDT
Tested with Zanata 3.4.2-SNAPSHOT (git-server-3.4.1-8-g1553fb4)

Common problem that appear both Firefox and Chrome
Steps to reproduced:
Start from Step 4. In any entry, trigger an error by adding an additional newline in the end of string.
6. Click the next page (or switch any other page)
7. Click "Save as Fuzzy"

Expected:
Entry that trigger should be saved as fuzzy.

Actual:
Entry that trigger was not saved at all.

With Firefox 24.4.0:
Button "Return to editor" does work, but it tooks 4.7 seconds on my local machine for it to disappear.
Comment 11 Ding-Yi Chen 2014-06-15 21:30:17 EDT
VERIFIED with Zanata 3.4.2-SNAPSHOT (git-server-3.4.1-16-gcaeed7b)
Firefox ESR 24.5.0
Google Chrome 35.0.1916.153

Note that Firefox is still slow to hide the dialog, but there was an loading indicator, so user won't think it's stop working and click on "Return to editor" multiple time.

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