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 persists when control loses focus, when rendered inside Panel or Modal #1619

Open
stevesuk opened this issue Aug 10, 2023 · 10 comments

Comments

@stevesuk
Copy link

Category

[ ] Enhancement

[X] Bug

[ ] Question

Version
3.15.0

Expected / Desired Behavior / Question
When I place a RichText control inside a Modal or Panel, I would expect that when the control loses focus, the toolbar should automatically hide.

Observed Behavior
The RichText toolbar is on screen permanently, no matter which element on the page has focus.

Steps to Reproduce
Use YO to setup a new Web Part project, add @pnp/spfx-controls-react to the project. Modify default React class component to add something like this to the render function:

<Panel isOpen={true} type={PanelType.medium} >
  <TextField value={this.state.textField} onChange={(event, value) => { this.setState({textField: value}); }} />
  <RichText value={this.state.richTextField} onChange={(text) => { this.setState({richTextField: text}); return(text); }} />
</Panel>

Observe that when clicking inside the RichText control, then clicking in the plain text field above it - the RichText toolbar remains visible.

image

Sit the same two text edit controls outside of the Panel (i.e. in the main body of the web part), and observe that focus/blur works fine.

@ghost
Copy link

ghost commented Aug 10, 2023

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 label Aug 10, 2023
@github-actions
Copy link

Thank you for submitting your first issue to this project.

@ivonool
Copy link

ivonool commented Mar 27, 2024

I have the same issue with this control on a panel - v3.17.0

@shubhamRathi0608
Copy link

Any fix yet? Having same issues

@shubhamRathi0608
Copy link

@stevesuk did you find any solution?

@stevesuk
Copy link
Author

stevesuk commented Apr 8, 2024

@stevesuk did you find any solution?

Wasn't able to find a fix for the reported bug. In the end we changed our solution to use the TinyMCE richtext editor instead (which was a minor battle in itself - but we got there).

@shubhamRathi0608
Copy link

@michaelmaillot any help please?

@michaelmaillot
Copy link
Collaborator

Hi @shubhamRathi0608, I'll try to have a look at some point, but feel free to give a try 🙂

@raclettierer
Copy link
Contributor

I have the same problem. in addition when I close the panel and reopen the extenden Dialog won't open any more

@magdalenafernlund
Copy link

magdalenafernlund commented Oct 28, 2024

@stevesuk

I had the same issue in a Panel. v3.19.0
When i added eventBubblingEnabled to the Panel component the problem disappeared.

<Panel 
  layerProps={{ eventBubblingEnabled: true }}
  ...otherProps...
</Panel

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

No branches or pull requests

6 participants