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

Code injection scrollbar not working #9635

Closed
petemahon opened this issue May 15, 2018 · 8 comments
Closed

Code injection scrollbar not working #9635

petemahon opened this issue May 15, 2018 · 8 comments
Labels
affects:admin Anything relating to Ghost Admin bug [triage] something behaving unexpectedly help wanted [triage] Ideal issues for contributors to help with

Comments

@petemahon
Copy link

petemahon commented May 15, 2018

Issue Summary

Using Chrome 66.0.3359.139 on Windows 10, 64 bit.

When custom code is added to the blog header via the Code Injection page and goes beyond the edge of the textbox, the scrollbar presents itself but is not clickable. The text box can only be scrolled to the right when highlighting code and dragging the selection to the right.

Steps to Reproduce

  1. Open Code Injection page in Settings
  2. Enter code which extends beyond the right side of the textbox.

The scrollbar should be interactive.

Technical details:

  • Ghost Version: 1.22.4
  • Node Version: v6.11.0
  • Browser/OS: Chrome 66.0.3359.139 on Windows 10, 64 bit
  • Database: Mysql

Edit: Updated with Node version

@aileen
Copy link
Member

aileen commented May 16, 2018

Hey @petemahon

I am not able to reproduce this. The scroll bar is clickable for me. I wonder what's the reason for that....

@aileen aileen added affects:admin Anything relating to Ghost Admin needs:info [triage] Blocked on missing information labels May 16, 2018
@vikaspotluri123
Copy link
Member

I'm able to reproduce this on Chrome 67 (I know it's beta, I have to figure out a way to use stable chrome for testing 😬) using Windows 10 Version 1803

Here's a screencap of what I'm seeing; I can't vertically scroll until some event allows me to (I originally thought I just had to make an edit, but I tried that later and it still didn't work, so it could also be a timing thing).

Note at the beginning when my mouse is still, I'm attempting to scroll using the ThinkPad Nipple™ which works pretty much everywhere else. An addendum to this issue is scrolling using the mouse scroll (which is what the nipple scrolling is) seems to not work in the code injection section, even after I can scroll using the scrollbar. @petemahon can you reproduce this with a normal mouse, or could this just be an edge case for me?

media1

Let me know if anything's unclear! 😃

@petemahon
Copy link
Author

Hey @AileenCGN and @vikaspotluri123, thank you both for your input. I've just updated this morning to 1.22.8 and I still see the same issue.

I have reproduced the issue in Firefox 60.0 (64 bit) on Linux Mint, and also on Windows 10 using the latest stable Chrome version.

@vikaspotluri123 I can only move around the section by dragging the text - touchpad, mouse scroll and touchscreen interaction are all unavailable for me.

@kevinansfield kevinansfield added bug [triage] something behaving unexpectedly help wanted [triage] Ideal issues for contributors to help with and removed needs:info [triage] Blocked on missing information labels May 16, 2018
@kevinansfield
Copy link
Contributor

I'll take a look at this next Monday unless anyone feels like jumping on it in the meantime 😄

@MattAunger
Copy link

Complete noob here so probably wrong.

I'm able to reproduce the issue in Chrome and Opera.
For me, changing pointer-events: none; to pointer-events: auto; for both .CodeMirror-hscrollbar and .CodeMirror-vscrollbar seems to fix. Not sure if there are dependencies on these classes elsewhere that will be thrown out of whack.

Like I said, probably wrong so take it or leave it 😄

@kevinansfield
Copy link
Contributor

I think the pointer-events: none; / pointer-events: auto; switching that CodeMirror does is likely the problem here.

There are some related issues here if anyone wants to try digging in:
codemirror/codemirror5#4676
codemirror/codemirror5#3677

I've not had a chance to look at it properly unfortunately but it sounds like either:

  1. something we're doing in our styles is messing up CodeMirror's initial scroll calculations
  2. CodeMirror has buggy behaviour on non-macOS systems where scrollbars are always visible

I would suggest 2 is the first place to look, if it's reproducible with stock CodeMirror then an issue will need to be opened there.

@kevinansfield kevinansfield added bug [triage] something behaving unexpectedly affects:admin Anything relating to Ghost Admin help wanted [triage] Ideal issues for contributors to help with and removed affects:admin Anything relating to Ghost Admin bug [triage] something behaving unexpectedly help wanted [triage] Ideal issues for contributors to help with labels May 28, 2018
@kevinansfield kevinansfield removed their assignment May 28, 2018
@abdallahalsamman
Copy link

abdallahalsamman commented Jun 1, 2018

@kevinansfield I could reproduce the bug on windows,

I checked CodeMirror's demos and they worked properly on windows.

so I think its the first option that we should dig in.

something we're doing in our styles is messing up CodeMirror's initial scroll calculations

Edit: I pushed a css change to fix this problem, please review

@kevinansfield
Copy link
Contributor

Vertical scroll is also broken on macOS. I expect it has something to do with this line that was added to fix a double scrollbar bug TryGhost/Admin@af91377

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:admin Anything relating to Ghost Admin bug [triage] something behaving unexpectedly help wanted [triage] Ideal issues for contributors to help with
Projects
None yet
Development

No branches or pull requests

6 participants