Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New lines in text fields are doubled #16765

Closed
svivian opened this issue Mar 26, 2021 · 5 comments
Closed

New lines in text fields are doubled #16765

svivian opened this issue Mar 26, 2021 · 5 comments
Assignees
Labels
Bug A problem or regression with an existing feature ui Issues relating to the user interface
Projects
Milestone

Comments

@svivian
Copy link
Contributor

svivian commented Mar 26, 2021

To Reproduce

Steps to reproduce the behavior:

  1. Browse a table that has a TEXT field, with multiple lines
  2. Click "full texts" (the <-T-> icon) to expand the table
  3. Click to edit inline, make some changes
  4. Press Enter or click away to save

Expected behavior

The text to be saved as written.

Screenshots

Every line break is duplicated, so if you have e.g.

My text
here

It shows as

My text

here

The original text is saved correctly, but the display is wrong. And if you click back in to edit the text, the textarea has the extra new lines, so it can get saved with the extra lines after that.

Server configuration

Same issue on localhost and the PMA demo server.

  • Operating system: Mac/Linux
  • Web server: Apache
  • Database version: 5.7.24 / 8.0.18
  • PHP version: 7.4
  • phpMyAdmin version: 5.1.0 (via git STABLE branch)

Client configuration

  • Browser: Chrome
  • Operating system: MacOS 11.2.3
@williamdes williamdes added Bug A problem or regression with an existing feature ui Issues relating to the user interface labels Mar 26, 2021
@williamdes williamdes added this to the 5.1.1 milestone Mar 26, 2021
@williamdes williamdes added this to Needs triage in issues via automation Mar 26, 2021
@williamdes williamdes moved this from Needs triage to Reproduced in issues Mar 26, 2021
@williamdes
Copy link
Member

Hi @svivian
Thank you for reporting this issue, I could reproduce it. Indeed there is some transformation done.
I tried to quick search for the cause but will have to continue searching :)

@williamdes
Copy link
Member

I tracked down the bug and found #12918 (5588045).
I think this was recently introduced by #16095 (2c7b704)
And that before that the display was good
Disabling css class .pre_wrap seems to remove the issue.

Maybe #12918 should be reverted now

cc @petrduda

@svivian
Copy link
Contributor Author

svivian commented Mar 30, 2021

Just an FYI, I reverted to 5.0.5 (branch QA_5_0) and the second part of the issue still occurs there - in other words when you click out of the textarea the correct text is shown, but if you click to edit the field again, it does have the duplicate line breaks.

@williamdes
Copy link
Member

Just an FYI, I reverted to 5.0.5 (branch QA_5_0) and the second part of the issue still occurs there - in other words when you click out of the textarea the correct text is shown, but if you click to edit the field again, it does have the duplicate line breaks.

Could you checkout QA_5_1 and remove 5588045 from the js dist or js src and re-build the JS files ?
Could you confirm that removing 5588045 does fix all issues?

@svivian
Copy link
Contributor Author

svivian commented Mar 30, 2021

Yes, that does appear to fix both the table display and the textarea when re-edited.

@williamdes williamdes self-assigned this Mar 31, 2021
williamdes added a commit that referenced this issue Mar 31, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from Reproduced to Closed Mar 31, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature ui Issues relating to the user interface
Projects
issues
  
Closed
Development

No branches or pull requests

2 participants