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] - Problem with edit mode #445

Closed
PooLP opened this issue Dec 16, 2019 · 5 comments
Closed

[RichText] - Problem with edit mode #445

PooLP opened this issue Dec 16, 2019 · 5 comments
Labels
status:tracked Triaged and are being investigated further status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:bug
Milestone

Comments

@PooLP
Copy link
Contributor

PooLP commented Dec 16, 2019

Category

[ ] Enhancement

[x] Bug

[ ] Question

Version

spfx : 1.9.1
sp-dev-fx-controls-react : 1.16
Sharepoint OnLine : Targeted and Standard release
Chrome/Edge : latest version
Windows 10 : latest version

Expected / Desired Behavior / Question

The edit mode don't work anymore

Observed Behavior

I'm use a richText editor in a WebPart to edit a simple introduction text. in edit mode, the richText do not switch to edit.

The problem started last week, and I didn't do any component-side updates (no update, the webpart was already installed and worked very well).

I updated to PnP SPFx Control 1.16, but I still have the problem.

I have tested on Chrome and Edge latest version with same problem.

I have tested with React DevTools. The condition pass a "isEditMode" attribut to true, but the "editing" state of component stay at false. (see screenshot)

richtext

I have tested with simple condition :
this.props.displayMode == DisplayMode.Edit
And state method, componentDidUpdate ... a lot of test.

Does anyone reproduce the problem?

Steps to Reproduce

  • Create a WebPart and add richText
  • Insert webpart to page (edit mode work on first insert)
  • Save the page
  • Reload the page
  • switch page to edit mode and try the edit of richtext

Thanks

@ghost
Copy link

ghost commented Dec 16, 2019

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

@ghost ghost added the Needs: Triage 🔍 label Dec 16, 2019
@PooLP PooLP changed the title [RicheText] - problem with edit mode [RichText] - Problem with edit mode Dec 16, 2019
AJIXuMuK added a commit that referenced this issue Dec 17, 2019
@AJIXuMuK
Copy link
Collaborator

Hi @PooLP!
I can reproduce that. It looks like SharePoint page lifecycle has been changed.
And the changes showed the error in RichText component.

I've committed the fix.
Could you please install the beta version and check if it works for you.

How to install beta version

@AJIXuMuK AJIXuMuK added status:tracked Triaged and are being investigated further status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:bug and removed Needs: Triage 🔍 labels Dec 17, 2019
@AJIXuMuK AJIXuMuK added this to the 1.17.0 milestone Dec 17, 2019
@PooLP
Copy link
Contributor Author

PooLP commented Dec 17, 2019

After test, it's ok for me.
Thanks.

PS :
I tried to resolve this bug myself.
I created a fork of the repos (dev branch), installed dependencies by npm -i
But, after lanched the gulp serve command, the debug didn't worked on my SharePoint environnement, i have error message like if serve do not run, i have this error :

An error occurred while loading the debug script. Make sure the server is running and that the URL for the "debugManifestsFile" parameter is appropriate.

Error: Script error for: https://localhost:4321/temp/manifests.js http://requirejs.org/docs/errors.html#scripterror

Do we need to do something more (run on docker an env with 1.3.0 spfx version of generator, specific version of VSC ...) ?

@AJIXuMuK
Copy link
Collaborator

Glad to hear it's resolved.

For the local development, you can do one of 3:

  1. set no http2 as mentioned here
  2. Use nvm and install node v6
  3. use docker

I use nvm :)

@PooLP
Copy link
Contributor Author

PooLP commented Dec 18, 2019

Thanks, I will do that! ^^
I close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:tracked Triaged and are being investigated further status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:bug
Projects
None yet
Development

No branches or pull requests

2 participants