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 placed at beginning of paragraph instead of where click happened #11573

Closed
KPeregrinePgh opened this issue Nov 7, 2018 · 10 comments
Closed
Labels
[Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Type] Bug An existing feature does not function as intended

Comments

@KPeregrinePgh
Copy link

Describe the bug
When editing a Paragraph in a post that has several Paragraph blocks. (No Paragraphs are selected yet. I'm proofreading.) I click on the spot I want to edit in a not-yet-selected Paragraph. Instead of positioning the cursor where I clicked (as in prior versions) 4.2.0 positions it at the start of the block so when I start to type I'm changing the beginning of the Paragraph, not the location where I clicked.

Might be the return of this very old bug, but this time it's on Windows 10 Firefox: #2472
My Firefox version did not change between Gutenberg 4.1.1 and 4.2.0

To Reproduce
Steps to reproduce the behavior:

  1. In Firefox Open an existing draft that has more than one paragraph. Don't click on anything yet. (i.e. Do not select any of the paragraphs.)
  2. Click on a location in the middle of a Paragraph where you want to make a change.
  3. Notice that the cursor is not placed where you clicked. It's at the beginning. If you want to make yourself crazy, start typing immediately and you'll be changing the beginning of the paragraph.

NOTE: Once you've selected a paragraph - just once - the good behavior returns to that paragraph for the rest of the edit session. If you click on every paragraph before you begin proofreading you can click on any one of them and get the proper cursor behavior.

Expected behavior
Click in the middle of an existing Paragraph block (that you have not yet selected) and the cursor is immediately positioned where you click. This is how it used to work prior to 4.2.0.

Screenshots
n/a

Desktop (please complete the following information):

  • Windows 10
  • Firefox
  • Version 63.0.1

Smartphone (please complete the following information):
n/a

Additional context

  • Gutenberg 4.2.0 **** This issue is new in 4.2.0 Was not a problem in 4.1.1
    -- My Firefox version did not change between Gutenberg 4.1.1 and 4.2.0
@designsimply designsimply added the Needs Testing Needs further testing to be confirmed. label Nov 7, 2018
@designsimply designsimply added [Type] Bug An existing feature does not function as intended [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... labels Nov 28, 2018
@designsimply
Copy link
Member

Tested and confirmed that the caret lands at the beginning of a paragraph when clicked but only for the first time you click on that paragraph within a given editing session. (45s)

Tested with WordPress 4.9.8 and Gutenberg master e4fd51cb5 (latest previous release: 4.5.1) using Firefox 63.0.3 on macOS 10.13.6.

@designsimply
Copy link
Member

Noting another tester was unable to replicate with macOS 10.14.1: #12380 (comment).

@designsimply designsimply removed the Needs Testing Needs further testing to be confirmed. label Nov 28, 2018
@bph
Copy link
Contributor

bph commented Nov 28, 2018

I can reproduce on Mac OX 10.13.6 Firefox Developer 64.0B12 -- Gutenberg 4.5.1.

First time clicking into paragraph block goes to the beginning of it. Clicking into another paragraph I also end up at the beginning. Trying to click 2nd time in 1st paragraph the cursor lands where I wanted it to click…

@frogmorris
Copy link

frogmorris commented Jan 28, 2019

We have been having the problem too on OSX chrome and my colleague has reported it on windows PC (will find out what browser). We've noted it happens if you leave the keyboard idle for a moment eg. you are typing, pause to check notes and then return to keyboard to finish sentence and the cursor has jumped back to the start of text block. If not aware you get edits in the wrong place and have to redo them which is very frustrating and time consuming.

@designsimply
Copy link
Member

We've noted it happens if you leave the keyboard idle for a moment eg. you are typing, pause to check notes and then return to keyboard to finish sentence and the cursor has jumped back to the start of text block.

I haven't observed this exact behavior myself, so I'm adding the Needs Testing label again to ask for help again from testers to get a confirmation.

@frogmorris for that check, do you by chance know if your colleague who is using Windows was also using Chrome? Also, is there any chance you can check from a different browser yourself just to rule out a browser-specific problem in your case? I ask because it could prove useful later to note whether there is a brower-specific problem at play and it's also worth noting that the behavior you have described is definitely a little different than the one in the original report here but I am not sure yet if it's different enough to warrant opening a separate issue.

@designsimply designsimply added the Needs Testing Needs further testing to be confirmed. label Jan 28, 2019
@frogmorris
Copy link

It is Chrome. My colleague reported it on Chrome on Windows and I have seen the same problem on Chrome on Mac OSX Mojave.
I noted the problem when editing posts and stopping mid paragraph so it sounds very similar.

@desrosj
Copy link
Contributor

desrosj commented Feb 5, 2019

I encounter this a lot when composing posts. I mainly use Firefox on MacOS.

@mrwweb
Copy link

mrwweb commented Feb 5, 2019

Having now used the block editor for a lot more writing and editing, this is the #1 bug I want fixed. It doesn't happen every time, but it does happen frequently (it feels like a majority of clicks when I'm proofing a post). I'm on Firefox, Win 10.

@designsimply
Copy link
Member

Thank you for the extra comments! I now feeling like there are two separate issues here:

  1. I click on the spot I want to edit in a not-yet-selected paragraph and the cursor is positioned at the start of the block and not where I clicked.
  2. The cursor jumped back to the start of text block after leaving the the keyboard idle for a moment (without clicking).

I think these should be tracked as two separate things because although related they are not exactly the same problem any may need to be solved differently in the code (someone do please correct me if that's wrong!). @frogmorris if you're still experiencing the 2nd issue, would you mind creating a new bug report for that and including a note about the OS/Browser versions where you've observed it for reference? In the mean time, we can continue the discussion about the problem where when you click on a previously unselected paragraph the cursor jumps to the start of the paragraph instead of at the position that was clicked.

@designsimply designsimply removed the Needs Testing Needs further testing to be confirmed. label Feb 5, 2019
@ellatrix
Copy link
Member

I think this is a duplicate of #11812, which was fixed and will be in Gutenberg 5.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

7 participants