umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
Other
4.49k stars 2.69k forks source link

RTE auto height adjustment sometimes fails #11839

Open Myster opened 2 years ago

Myster commented 2 years ago

Which exact Umbraco version are you using? For example: 9.0.1 - don't just write v9

8.17.0

Bug summary

Sometimes the auto-height adjustment for the RTE property does not work correctly. leaving the RTEs looking like this: image This seems to occur in conjunction with opening an RTE within Nested Content.

Specifics

I did not see any console errors in conjunction with the failure to resize the RTE

Steps to reproduce

Given:

This failure to resize is somewhat intermittent, I suspect a timing issue (perhaps font loading) or something is involved. The resizing fails to occur in other circumstances also, but the above seems the most consistent. Other scenarios could include just the RTE in a nested content data type. and switching tabs a few times, sometimes it fails to expand

In all cases clicking in the RTE edit area causes the resize to occur correctly.

Expected result / actual result

I expect the RTE to be the correct size when opening the tab/nested content

umbrabot commented 2 years ago

Hi @Myster,

We're writing to let you know that we would love some help with this issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know.

For more information about issues and states, have a look at this blog post

Thanks muchly, from your friendly Umbraco GitHub bot :-)

markadrake commented 2 years ago

This behavior may be related.

TBH I had a hard time trying to reproduce your issue @Myster. Could you tell me if you think what I've captured below may have the same root cause as your issue? I'm guessing they are related.

Steps in the case below:

  1. Create an element type
    • Add just 1 property with a rich text editor data type
  2. Create a document type
    • Create a property with a block list data type
    • Configure that block list to include the element type created in step 1
    • Configure that block list for inline editing
    • Save the document type
  3. Create your content
    • Add 2+ RTE editors, add text if you like
    • Save
  4. Reproduce the issue
    • Open both blocks so you can see the content
    • Sort them
    • Watch the RTE height close completely, hiding your content
  5. Resolve the issue
    • Resolve it by toggling the block list closed/open again

https://user-images.githubusercontent.com/713355/150909155-859fc07a-2f76-46e8-a47a-1be9bba38174.mp4

Myster commented 2 years ago

It does seem similar, the code to resize the RTE seems to not get triggered sometimes, perhaps your case has a different trigger (or not), or perhaps the trigger isn't 'general' enough. I can work around it easily enough by clicking in the RTE to trigger the resize. (although my RTE has more room to click that yours)

Myster commented 2 years ago

I also just noticed this on a 9.2.0 website, the RTE was on a tab (not in a nested content or block editor) It was a "simple RTE" with only Bold, Italic, Link

kjac commented 1 year ago

Hi everyone,

I can replicate this on V10, but it's quite hard and happens very rarely. Thus I suspect it's going to be equally hard to fix, but anyone feeling up for it should definitively have a go at it 👍