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

RichText toolbar appears on top of page #265

Closed
semopz opened this issue Apr 1, 2019 · 3 comments
Closed

RichText toolbar appears on top of page #265

semopz opened this issue Apr 1, 2019 · 3 comments
Milestone

Comments

@semopz
Copy link

semopz commented Apr 1, 2019

Category

[ ] Enhancement

[x] Bug

[ ] Question

Version

Please specify what version of the library you are using: [1.13.0-beta]

Expected / Desired Behavior / Question

The floating toolbar should appear next to the RichText control. Ideally, the user should be able to hide or move the toolbar out of the way, but it should appear as close to the control as possible or at least in the viewport.

Also, if there are multiple RichText controls, the toolbar should appear next to the control that has the focus/cursor.

I think it is reasonable to require that only one RichText control is in edit mode at any given time to make the toolbar 'stick' to the input. Ideally, with multiple controls, the toolbar should move to there the focus is.

Observed Behavior

The toolbar appears at the top of the page regardless of where the RichText control is placed. Scrolling up to the top may be required is the RichText control is too far down the page.

Steps to Reproduce

Just place enough divs above the RichText control to push it down to the bottom of the page.

@joeljeffery
Copy link
Contributor

joeljeffery commented May 23, 2019

I could reproduce the problem. If you wrap the RichText in a

with relative positioning, the bug seems to go away.

<div style={{ position: relative }}><RichText ... /></div>

@giveitaGo
Copy link

Thank you @joeljeffery you saved me the effort of debugging this.

@Zerg00s
Copy link

Zerg00s commented Aug 8, 2020

Thank you, @joeljeffery , wrapping RichText with <div style={{ position: 'relative' }}>...</div> fixed the issue for me

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

No branches or pull requests

5 participants