Skip to content

Loading…

Weird cursor problems immediately after launch #8524

Closed
peterflynn opened this Issue · 14 comments

5 participants

@peterflynn
Adobe Systems Incorporated member
  1. Open QuickOpen.js
  2. Scroll down until line ~68 is at the top of the view
  3. Put cursor at the start of line 75
  4. Restart Brackets
  5. Click somewhere in the middle of the view
  6. Click there again

Result:
4 - top of view is further down -- cursor hidden above the top
5 - cursor goes about 10 lines below where you clicked
6 - cursor goes to correct location, but view scrolls up about 1/2 line for no apparent reason

Clicking now works fine, but if I scroll by dragging the scrollbar thumb, the next two clicks will show the same problem as steps 5 & 6 again.

CC @dangoor @MiguelCastillo -- this just started happening after syncing today

@peterflynn peterflynn added this to the Release 0.42 milestone
@peterflynn
Adobe Systems Incorporated member

I'm seeing other weird problems too:

  • Sometimes, the active line highlight is on a separate line from the cursor
  • Sometimes, scrolling with mousewheel moves the text but not the cursor
  • Sometimes, the bottom ~2px of the cursor are missing (it's not as tall as the text) -- most often seen on whatever line the cursor was on at the time Brackets started up

Which of these symptoms you see at startup seems to depend either on the exact pixel alignment of the top of the viewport, or maybe just on timing. They seem to come & go, but something goes wrong almost every time I restart.

@peterflynn
Adobe Systems Incorporated member

I think this was caused by #8512. This sounds like exactly the sort of bugs we used to see when the web font didn't finish loading before CM started measuring text. The .dummy-text selector in brackets.less must have the code editor webfont's font-family set on it -- which up until now it was getting via .code-font().

(An important side note from this is that theme extensions have no safe way of using other webfonts as the editor font. I think that's an ok limitation for now, but we should make sure to document it somewhere).

@peterflynn
Adobe Systems Incorporated member

I can confirm that backing out that changes to .code-font() in brackets_theme_default.less fixes this

@MiguelCastillo
Adobe Systems Incorporated member

@peterflynn I am really thinking that his change isn't really needed.... Is there a quick change we can do to fix it? Otherwise we could just back the changes in the less file. The changes in the ViewCommandHandlers is needed though.

@MiguelCastillo
Adobe Systems Incorporated member

@peterflynn Can you give this a try and let me know how it goes please?

@MiguelCastillo
Adobe Systems Incorporated member
@dangoor

So far, in my testing #8526 fixes this.

@peterflynn
Adobe Systems Incorporated member

@dangoor I'm a little skeptical that #8526 fixes this -- in my testing I wasn't clicking anywhere that would show a matching-brace highlight... and none of the conditions that required the .dummy-text workaround have changed afaik (yet we've now removed the workaround).

Also -- since this is load-timing sensitive, it may be harder to reproduce on some machines (SSD?) than others...

@MiguelCastillo
Adobe Systems Incorporated member

yeah the line height setting isn't really what's breaking this... peter try #8525 if you can. it is a time sensitive thing.

@redmunds

I can no longer repro this one in the #8526 branch.

@dangoor

@peterflynn Indeed, load timing issues could be different on different machines, so it's quite possible that the font loading change could make a difference that's not visible on my machine.

@peterflynn peterflynn was assigned by pthiess
@pthiess
Adobe Systems Incorporated member

@peterflynn to verify fix

@dangoor

@peterflynn can you still see any of these problems at startup?

@peterflynn
Adobe Systems Incorporated member

Oops, meant to close this last cycle -- definitely doesn't happen anymore

@peterflynn peterflynn closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.