slate icon indicating copy to clipboard operation
slate copied to clipboard

Update editable.tsx: auto-focus fix for end of line with several chil…

Open GrinchakAndrew opened this issue 3 years ago • 7 comments

Solution resolves cursor position in the Editor with autofocus set to true, when cursor pos is 0 instead of end of line.

GrinchakAndrew avatar Nov 27 '21 19:11 GrinchakAndrew

⚠️ No Changeset found

Latest commit: 6f2e3428a939d699c7097735f69acb3a4b1662a4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Nov 27 '21 19:11 changeset-bot[bot]

@GrinchakAndrew any chance you have time to wrap this one up. It looks like it needs a linting fix and there are a couple of comments to address. Thanks!

dylans avatar Jan 11 '22 13:01 dylans

packages/slate-react/src/components/editable.tsx

Hello, i am afkb for the time being. No need to run linting on the whole project. Pls., add it to one line of code.

GrinchakAndrew avatar Jan 11 '22 15:01 GrinchakAndrew

packages/slate-react/src/components/editable.tsx

Hello, i am afkb for the time being. No need to run linting on the whole project. Pls., add it to one line of code.

Unfortunately because you created your PR from your main branch it's not easy to clone your PR locally. But I'll make it work.

dylans avatar Jan 11 '22 15:01 dylans

Andrew lives in Ukraine so I know he won't be able to finish this anytime soon. We discovered this issue on a project together so I'll get this to the finish line.

Looks like code-highlighting.ts and markdown-shortcuts.ts are both failing. I'm taking a look, but am unable to run the cypress tests locally. Is there a recommended node version or caveat to getting it to run locally? (Using node v14.17.6 and OS Ubuntu 20.04)

JustinBeaudry avatar Mar 23 '22 16:03 JustinBeaudry

Is there a recommended node version or caveat to getting it to run locally? (Using node v14.17.6 and OS Ubuntu 20.04)

Hi @JustinBeaudry, thanks, I hope @GrinchakAndrew is ok.

With respect to running locally, they run for me with 14.15.5 on macOS, but there's nothing special about that version. If they won't run locally you can commit to the PR which will trigger a re-run which is not ideal but better than nothing. Feel free to ping me on Slack ( https://join.slack.com/t/slate-js/shared_invite/zt-f8t986ip-7dA1DyiqPpzootz1snKXkw ) if you're stuck.

dylans avatar Mar 27 '22 15:03 dylans

My attempt at using GitHub's tooling to resolve merge conflicts failed badly here. I will look at this later.

dylans avatar Oct 04 '23 13:10 dylans