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

Comments

4 participants
@ivirshup

ivirshup commented Dec 12, 2016

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 from Spacing in code blocks on Safari 10 to Spacing in text cells on Safari 10 Dec 12, 2016

@gnestor

This comment has been minimized.

Show comment
Hide comment
@gnestor

gnestor Dec 15, 2016

Contributor

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

Contributor

gnestor commented Dec 15, 2016

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

@gnestor gnestor added the type:Bug label Dec 15, 2016

@gnestor gnestor added this to the 4.3.1 milestone Dec 15, 2016

@minrk

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Dec 15, 2016

Member

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?

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

This comment has been minimized.

Show comment
Hide comment
@gnestor

gnestor Dec 15, 2016

Contributor

@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.

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

This comment has been minimized.

Show comment
Hide comment
@ivirshup

ivirshup 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.

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

This comment has been minimized.

Show comment
Hide comment
@fonnesbeck

fonnesbeck Dec 16, 2016

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.

fonnesbeck commented Dec 16, 2016

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

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Dec 19, 2016

Member

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?

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

This comment has been minimized.

Show comment
Hide comment
@fonnesbeck

fonnesbeck Dec 20, 2016

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

fonnesbeck commented Dec 20, 2016

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

@gnestor

This comment has been minimized.

Show comment
Hide comment
@gnestor

gnestor Dec 20, 2016

Contributor

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

Contributor

gnestor commented Dec 20, 2016

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

@gnestor

This comment has been minimized.

Show comment
Hide comment
@gnestor

gnestor Dec 20, 2016

Contributor

@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/CodeMirror#4454

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/CodeMirror#4454

@minrk minrk modified the milestones: 4.3.1, 4.3.2 Dec 21, 2016

@minrk minrk closed this in e03ab77 Dec 21, 2016

minrk added a commit that referenced this issue Dec 21, 2016

Backport PR #2004: Downgrade to CodeMirror 5.16
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

This comment has been minimized.

Show comment
Hide comment
@gnestor

gnestor Dec 21, 2016

Contributor

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/CodeMirror#4454 and we can re-open this issue if we find that the source of this is in fact in notebook.

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/CodeMirror#4454 and we can re-open this issue if we find that the source of this is in fact in notebook.

@minrk minrk referenced this issue Jan 24, 2017

Merged

Patch CodeMirror 5.22 #2066

1 of 1 task complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment