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

Spacing in text cells on Safari 10 #1967

Closed
ivirshup opened this issue Dec 12, 2016 · 10 comments · Fixed by #2066
Closed

Spacing in text cells on Safari 10 #1967

ivirshup opened this issue Dec 12, 2016 · 10 comments · Fixed by #2066

Comments

@ivirshup
Copy link

I've been encountering some formatting strangeness in any text block (code and markdown) on Safari v10.0.1 using jupyter notebook v4.3.0.

Spaces in text are not being show. Once characters are placed the formatting looks correct. I've included an example below:

jupytercode_spacing

If there are characters on the line after the cursor, there don't seem to be any issues. I haven't been able to replicate the issue in Chrome.

Possibly related to #1943. Thanks for any help!

@ivirshup ivirshup changed the title Spacing in code blocks on Safari 10 Spacing in text cells on Safari 10 Dec 12, 2016
@gnestor
Copy link
Contributor

gnestor commented Dec 15, 2016

It looks like this was affecting jupyterlab and is now resolved: jupyterlab/jupyterlab#522

@gnestor gnestor added the bug label Dec 15, 2016
@gnestor gnestor added this to the 4.3.1 milestone Dec 15, 2016
@minrk
Copy link
Member

minrk commented Dec 15, 2016

I've definitely seen this, but can't seem to make it happen now (also Safari v10.0.1). @ivirshup does this happen with any text (i.e. cursor doesn't move across whitespace, only when characters are entered), or only in specific circumstances?

@gnestor
Copy link
Contributor

gnestor commented Dec 15, 2016

@minrk I'm only observing it when on single spaces. Double spaces and characters after single spaces update correctly. I'm testing against notebook at master on Safari 10.0.2.

@ivirshup
Copy link
Author

ivirshup commented Dec 16, 2016

@minrk

I'm haven't done very thorough testing, but I just spent about ten minutes in a fresh notebook and this is what I'm seeing:

In code cells

Strange space formatting:

  • Will occur immediately after any delimiter
    • e.g. =, ,, ., (, ), [, ], {, }, ", ', etc.
  • Will not occur within closed delimiters
  • Will not occur within compound statement if closed by :
    • e.g. it will occur here if x =={cursor}, but not hereif x =={cursor}:

In markdown cells

Strange space formatting occurs:

  • Unless cursor is at start of a new line
  • Unless cursor is placed immediately after closed markup delimiter (e.g. *text*{cursor})
  • Unless within markup delimiters (e.g. *text{cursor}*)

Hope this helps!

edit: Fixed grammar.

@fonnesbeck
Copy link

I'm seeing it now on 10.0.2 also with notebook 4.3.0. Where I see it most prominently is when I type a space, but the cursor does not move, yet when I type a letter afterwards, it is properly spaced. So the space registered, but was not displayed until additional text was added.

@minrk minrk modified the milestones: 4.3.2, 4.3.1 Dec 19, 2016
@minrk
Copy link
Member

minrk commented Dec 19, 2016

Thanks for the detailed circumstances. I know I've seen this in the past, but can't make it happen today. Since @gnestor seems to be able to, I'll let him try to tack it down. If it's a regression in 4.3, it's most likely related to the bump in codemirror version. Can anyone here who sees this in 4.3 tell if the behavior is different in 4.2?

@fonnesbeck
Copy link

I only noticed it starting in 4.3, and its the sort of thing that would jump out at me.

@gnestor
Copy link
Contributor

gnestor commented Dec 20, 2016

I did some testing and it appears that this behavior appears in CodeMirror 5.17...

@gnestor
Copy link
Contributor

gnestor commented Dec 20, 2016

@flying-sheep @oxinabox Pinging you because upgrading to CodeMirror 5.21 introduced a regression for Safari 10 users. I'm trying to track down the cause. I've found that it was introduced after 5.16. I created an issue on codemirror: codemirror/codemirror5#4454

@minrk minrk modified the milestones: 4.3.1, 4.3.2 Dec 21, 2016
@minrk minrk closed this as completed in e03ab77 Dec 21, 2016
minrk added a commit that referenced this issue Dec 21, 2016
Temporary fix for #1967

I have tested and this resolves the strange space behavior in Safari 10 👌

Signed-off-by: Min RK <benjaminrk@gmail.com>
@gnestor
Copy link
Contributor

gnestor commented Dec 21, 2016

This is temporarily fixed by downgrading CodeMirror to 5.16.

@flying-sheep @oxinabox I understand that you have contributions that have been merged since 5.16, so we intend to upgrade to the latest version as soon as we can resolve the source of this issue.

Let's move conversation to codemirror/codemirror5#4454 and we can re-open this issue if we find that the source of this is in fact in notebook.

@minrk minrk mentioned this issue Jan 24, 2017
1 task
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2021
echarles pushed a commit to datalayer-externals/jupyter-notebook-classic that referenced this issue Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
4.3.1
Closed issues
Development

Successfully merging a pull request may close this issue.

4 participants