Description of problem:Copy button in webtrans editor table should copy source to editor window without saving, but instead copies source and saves without opening an editor window.
Version-Release number of selected component (if applicable):
How reproducible: always
Steps to Reproduce:
1.Sign in and select 'Translate' to open webtrans editor
2.Click the copy from source button
Actual results:No editor window is opened, source string is copied to target and saved as approved.
Expected results: Editor window is opened for the row on which the copy button was pressed, source string is copied to the editor window, editor window has focus, no save operation is performed (before the user invokes a save operation or navigates away from the editor).
This button should cause the corresponding editor to open, give it focus, and position the cursor at the end of the text. The Save shouldn't happen until the Save button is clicked, or the editor loses focus (ie standard "implicit save").
I have fixed this issue, the reason that caused this issue is sourcePanel has a click handler to perform 'implicit save', it means if user click the sourcePanel, the sourcePanel will close the editor and save the content in editor. Since copy button is moved to sourcePanel and become a child widget of sourcePanel, if user click the copy button, it will also trigger this click handler, then cause the problem.
I move the click handler to Lable widget inside the sourcePanel, then clicking copy button will not trigger the 'implicit save' now.
I once tried to detect the onBlur event of editor, but it is difficult to distinguish which cause the onBlur event, it could be clicking the sourcePanel, it also could be clicking the copy button, so i have to add a click handler to detect the click event.
VERIFIED with Zanata version 1.4-SNAPSHOT (20110815-0602)
With Firefox 5.0 and Google Chrome 13.0.782.107