Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • erp5 erp5
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 141
    • Merge requests 141
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • erp5erp5
  • Merge requests
  • !1371

Merged
Created Mar 02, 2021 by Gabriel Monnerat@gabrielDeveloper

Fix issue with floating point and deferErrorText erasing input value

  • Overview 11
  • Commits 4
  • Pipelines 3
  • Changes 14

Test Results

Initial information about how to reproduce the error with FloatFied

1. Create a Foo object and access his "View"
2. If you are using a browser in English, type "1-". If you are in French language, please type "1.1".
3. The value will disappear.
4. If you type again the same thing, it does not disappear and you can save

Technical information

When the new gadget state error_text is modified, onChangeState is called as expected. But this function does not check in detail which state parameters were modified, and it rewrite the full DOM element. https://lab.nexedi.com/nexedi/erp5/commit/ea219b746f32e972532ce1b3bcb9680dbc9110b6#39e57165e4463915ac8718d0a6b537ed40d49dd3_51_51

https://lab.nexedi.com/nexedi/erp5/commit/ea219b746f32e972532ce1b3bcb9680dbc9110b6#39e57165e4463915ac8718d0a6b537ed40d49dd3_211_243 This also set the value to an empty string, as from the browser point of view, what the user types was not valid.

Edited Mar 02, 2021 by Gabriel Monnerat
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: fix_value_disappearing
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7