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.
Created attachment 901553 [details] Screenshot: Dialog "Invalid Translation" failed to get focus
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.
Pull request: https://github.com/zanata/zanata-server/pull/485
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.
The newline not showing error bug is tracked with Bug 1105375.
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?
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.
Created attachment 906801 [details] Screen cast of bug reproduced in Chrome Screen cast of bug reproduced in Chrome
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.
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.