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

Empty lines are sometimes doubled when editing text box in Firefox #1608

Open
aclindsa opened this issue May 3, 2024 · 1 comment
Open

Comments

@aclindsa
Copy link

aclindsa commented May 3, 2024

  • OS Version: linux x86-64
  • Browser Version: Firefox 125.0
  • Browser Addon Version: 0.2.16
  • Neovim Plugin Version: 0.2.16

What I tried to do

Edit a text field at https://jupyter.org/try-jupyter/notebooks/?path=notebooks/Intro.ipynb with firenvim in Firefox, and have blank lines be preserved across entering/exiting the editing session.

What happened

When beginning to edit a text field with firenvim in Firefox, single blank lines in the browser's native text box becomes two blank lines in firenvim in some situations. For example, opening this:

2024-05-03-105625_397x233_scrot

becomes this in firenvim:

2024-05-03-105709_7720x2160_scrot

And, predictably, if I write the results of that editing session without first deleting the extra two lines, I end up with extra newlines back in the firefox text box:

2024-05-03-110100_371x307_scrot

Additional observations

Note that it is only empty lines which are doubled - two adjacent non-empty lines do not have an extra newline inserted between them (honestly, this confuses me more than if every newline were doubled!).

Also, this isn't universally the case - some text boxes work fine, but other times I see the blank line-doubling behavior. You can visit https://jupyter.org/try-jupyter/notebooks/?path=notebooks/Intro.ipynb to test a problematic case - edit the text field with the first line of "from matplotlib import pyplot as plt" in Firefox.

I am able to use firenvim in Chromium and do not observe the same behavior as I do in Firefox. I also noticed while testing this that in Firefox, firenvim has the filetype set to text, while chromium has it set to python... I don't know if that's a clue or just some other difference.

@gi1242
Copy link

gi1242 commented Oct 16, 2024

Hi there; just commenting I have the exact same issue when editing python notebooks in Jupyter. I see it even on local notebooks. If you open any jupyter notebook via jupyter -lab ~/jupyter-notebooks and edit a new notebook. Then the new lines in every cell get doubled every time firenvim takes over a textarea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants