Bug 729524
Summary: | Copy button in webtrans instantly saves instead of allowing edits | ||
---|---|---|---|
Product: | [Retired] Zanata | Reporter: | David Mason <damason> |
Component: | Component-UI | Assignee: | James Ni <jni> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Ding-Yi Chen <dchen> |
Severity: | unspecified | Docs Contact: | |
Priority: | high | ||
Version: | 1.3-alpha-3 | CC: | jni, sflaniga, zanata-bugs |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | 1.4 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-10-28 07:05:43 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 729533 |
Description
David Mason
2011-08-10 03:20:57 UTC
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 |