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

Cursor forces hard left on mouse click of first line only - Win10 version 0.9.92 #3718

Closed
narration-sd opened this issue Jul 19, 2020 · 13 comments · Fixed by noatpad/typora-theme-ursine#61

Comments

@narration-sd
Copy link

[think I posted this at first in wrong repo; copied here so you can be sure to see it, and the compliment, Abner]

I believe began on this release

  • new document
  • type a first line
  • click mouse anywhere within line
  • cursor jumps back to beginning of this first line
  • only arrow keys can move cursor now on that first line
  • give up, arrow to end of line, return key to start another
  • on second line, clicking puts cursor where you clicked, in the normal way
  • any further lines, still works
  • first line, never
  • now, go to that beginning of first line and insert (type) a # - Markdown top title
  • click another line, first now has style
  • click within first line once again: line reverts to plain text, but cursor is where you clicked
  • but try clicking again, and now you are back to forced to beginning of line

I think that story about covers it.

Then I have to say, Typora is wonderful - have used it for years as a primary Markdown editor,
and as literary journaling editor as well.

Thank you, Abner.

@abnerlee
Copy link
Contributor

Possible to attach a screencast about this, since we cannot reproduce it.

@abnerlee
Copy link
Contributor

relates #3696

@narration-sd
Copy link
Author

narration-sd commented Jul 21, 2020

Here's a gif movie which shouild illustrate fully, Abner, thanks...

sticking-first-line-cursor

@narration-sd
Copy link
Author

Abner, two more points to help:

  • I tried closing Typora and re-opening, choosing the file. The same force-left-on-click behavior showed on the first line, with no additional typing
  • I then fully removed Typora 0.9.92 from the machine (very up-to-date and maintained Win10 Home; I develop software), and installed instead 0.9.89 from the list you kindly provided. On 0.9.89, there is no problem. The cursor goes where you click the mouse, everywhere including the first line.

Should help, I think...best, Clive

@cchdequip
Copy link

Just to let you know that this problem continues unchanged, in latest 0.9.93
I've sent you the movie requested of this happening in detail, above
I've again reverted to 0.9.89 to write without the issue

@narration-sd
Copy link
Author

@abnerlee - just noticed the Need More Info label still on this -- two weeks ago, I gave you the info you wanted, a movie -and more - few items above if you want to visit this issue....

Thanks, Clive

@abnerlee
Copy link
Contributor

abnerlee commented Aug 4, 2020

@narration-sd Sorry for late reply. I saw your videos but still unable to reproduce this on my own, so:

  • Which theme did you use and does this happen in built-in themes?
  • By click, you mean mouse click or just click using trackpad, or there's no difference.
  • Did you use any IME or non En-US keyboard layout to input the first sentence?

@narration-sd
Copy link
Author

@abnerlee great, think your ideas found it...

  • I was using Ursine Umbra -- kind of a very nice and friendly one, reminds of childhood even though I am 'mature'; good atmosphere for attitude in fiction writing
  • and indeed, the problem is there, in Ursine Umbra, maybe others, but not in all Themes.
  • I tried Minimalism and Night just now, and no problem occurs - they are fine on this issue
  • I went back to Ursine Umbra, and the problem recurs, so that's pretty solid
  • I'm exclusively using the trackpad on the laptop
  • no IMEs turned on, though I have a Korean one (!) available - once lived there, taught grad school design, very fine & interesting times, and part of a life there in my 20s

Ok, enough history, and hope this gets you on a straightforward track, Abner.

I really value Typora, use it for fiction as said, journaling, and also some other things, or checking a result.
It's really a fine tool to work with, in all ways.

Best,
Clive

@narration-sd
Copy link
Author

@abnerlee just so you know...^^^

@abnerlee
Copy link
Contributor

abnerlee commented Aug 6, 2020

This is caused by the css provided by 3rd theme, For fix you can change

#write > p:first-child:not(:only-child)::before, 
#write > p:only-child::before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("ursine/night.png") no-repeat 45% 90% transparent;
  background-size: cover;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  opacity: 0;
}

#write > p:only-child:empty::before {
  opacity: 1;
}

to

#write > p:only-child:empty::before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("ursine/night.png") no-repeat 45% 90% transparent;
  background-size: cover;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  opacity: 1;
}

in ursine-umbra.css

@narration-sd
Copy link
Author

Thanks, Abner -- interesting, subtle change, for such an effect...

I'll try it out, after a tele-meeting coming up just now.

Appreciate the workaround!

@narration-sd
Copy link
Author

narration-sd commented Aug 6, 2020

...and indeed, @abnerlee , that change at the css level seems to do the trick -- no more cursor jumping left on the first line.

And now I can use that favorite theme before any update.

A nice thing, thank you, Abner...

(p.s. I'll try out and then close this once the official version has it's time to come through.)

@noatpad
Copy link

noatpad commented Aug 10, 2020

Merged the PR from @abnerlee to implement the fix into Ursine, and there's a new release with it now. Thanks for the heads up and sorry for the inconvenience!

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

Successfully merging a pull request may close this issue.

4 participants