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

[Editable] forwardRef #4082

Closed
Mangatt opened this issue Feb 18, 2021 · 4 comments · Fixed by #5681
Closed

[Editable] forwardRef #4082

Mangatt opened this issue Feb 18, 2021 · 4 comments · Fixed by #5681
Labels

Comments

@Mangatt
Copy link
Contributor

Mangatt commented Feb 18, 2021

Do you want to request a feature or report a bug?

Feature

What's the current behavior?

Editable is not able to hold ref

Slate: 0.60.4
Browser: Chrome / Safari / Firefox / Edge
OS: Mac / Windows / Linux / iOS / Android

What's the expected behavior?

Editable could be able to hold ref with React.forwardRef. Since this component is currently using ref internally, ref would have to be patched, but technically this does not pose a problem.

If there isn't reason for this limitation in Slate internals, I'll create PR.

@williamstein
Copy link

Comment from a user (hence a +1 for this idea): A few days ago I had no choice but to implement something very similar to this in my local copy of slate-react in order to implement scroll position save/restore (when you come back to editing a document, I need to restore the scroll position).

sagemathinc/cocalc@18b2694

@Mangatt Mangatt changed the title Editable forwardRef [Editable] forwardRef Feb 18, 2021
@skotchpine
Copy link

Same issue for us at userhero.io

@bryanph
Copy link
Contributor

bryanph commented Dec 8, 2021

No reason, PR is welcome

@WillTaylor22
Copy link

Apologies for not contributing much - and thanks for all the great work, but just thought I'd +1 this as this would be super valuable for our startup.

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

Successfully merging a pull request may close this issue.

6 participants