This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 729524 - Copy button in webtrans instantly saves instead of allowing edits
Copy button in webtrans instantly saves instead of allowing edits
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-UI (Show other bugs)
1.3-alpha-3
Unspecified Unspecified
high Severity unspecified
: ---
: ---
Assigned To: James Ni
Ding-Yi Chen
:
Depends On:
Blocks: Zanata-1.4
  Show dependency treegraph
 
Reported: 2011-08-09 23:20 EDT by David Mason
Modified: 2011-10-28 03:05 EDT (History)
3 users (show)

See Also:
Fixed In Version: 1.4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-10-28 03:05:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description David Mason 2011-08-09 23:20:57 EDT
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).


Additional info:
Comment 1 Sean Flanigan 2011-08-09 23:24:46 EDT
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").
Comment 2 James Ni 2011-08-10 22:24:31 EDT
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.
Comment 3 Ding-Yi Chen 2011-08-15 00:56:45 EDT
VERIFIED with Zanata version 1.4-SNAPSHOT (20110815-0602)

With Firefox 5.0 and Google Chrome 13.0.782.107

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