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

Fix: RichEditor spacing when no buttons #2529

Merged

Conversation

johncarter-
Copy link
Contributor

@johncarter- johncarter- commented May 24, 2022

When there are no buttons the toolbar ->disableAllToolbarButtons() - the bar still shows, causing an extra line.

Before

image

After

image

This conditionally hides the bar is no buttons.

Please let me know if you prefer a different syntax for the conditional class.

@danharrin
Copy link
Member

Does this also fix the toolbar overflow issues here? #2514

I assume it does, with the overflow-x-auto?

@johncarter-
Copy link
Contributor Author

Does this also fix the toolbar overflow issues here? #2514

I assume it does, with the overflow-x-auto?

Something seems off here, looks like I have merged the wrong classes 🤦‍♂️

I'm not sure about the related issue.

@danharrin
Copy link
Member

danharrin commented May 24, 2022

Can't we just wrap the toolbar in an @if (count($getToolbarButtons())) instead of using the class?

@danharrin danharrin added the bug Something isn't working label May 24, 2022
@johncarter-
Copy link
Contributor Author

Much better solution 🤦‍♂️

@johncarter-
Copy link
Contributor Author

Removing the bar with the if directive results in a console error and the form failing to save:

image

I assumed it was a diffing issue so wrapped the if in a div but no joy. Shall I revert to CSS hidden?

@danharrin
Copy link
Member

Yeah thats fine, lets use hidden then. Trix must not like it

@danharrin
Copy link
Member

Btw, this entire issue is Chrome-only 😅 Safari wins for once

@danharrin danharrin linked an issue May 26, 2022 that may be closed by this pull request
@danharrin
Copy link
Member

Also fixed #2514

Thanks John!

@danharrin danharrin merged commit 58018bd into filamentphp:2.x May 26, 2022
@johncarter-
Copy link
Contributor Author

Cheers Dan, sorry to leave you hanging there - I'm full-time Dadding at the mo.

@danharrin
Copy link
Member

No worries John! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RichEditor overflow when attaching an item
3 participants