Make WordPress Core

Opened 7 years ago

Closed 5 years ago

Last modified 4 years ago

#39518 closed defect (bug) (worksforme)

All wpviews rerender after add content

Reported by: programmin's profile programmin Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7
Component: TinyMCE Keywords: reporter-feedback
Focuses: ui, performance Cc:

Description

Looks like whenever something is added, ALL wpviews re-render. In the wpview/plugin.js:

editor.on( 'setcontent', function( event ) {
			if ( event.load && ! event.initial && editor.quirks.refreshContentEditable ) {
				// Make sure there is a selection in Gecko browsers.
				// Or it will refresh the content internally which resets the iframes.
				editor.quirks.refreshContentEditable();
			}

			wp.mce.views.render();
		} );

This can cause heights of wpviews above to change with rerender of the views... is this really necessary for ALL views?

Change History (5)

#1 @iseulde
7 years ago

  • Component changed from Editor to TinyMCE
  • Keywords reporter-feedback added
  • Version changed from trunk to 4.7

Thanks for the report. Which browser are you testing? Firefox?

editor.quirks.refreshContentEditable should only do something in Firefox when the selection disappears.

https://github.com/tinymce/tinymce/blob/4.4.3/js/tinymce/classes/util/Quirks.js#L1637

It should be fixed in newer Firefox versions though.

#2 @iseulde
7 years ago

It's a good reminder to drop the call entirely next release when upgrading to TinyMCE 4.5.

https://github.com/tinymce/tinymce/blob/4.5.2/js/tinymce/classes/util/Quirks.js#L1657

#3 @programmin
7 years ago

I'm not sure what that means, and latest WP should be using MCE 4.5.

#4 @azaozz
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to fixed
  • Status changed from new to closed

This seems to have been fixed some time ago.

#5 @SergeyBiryukov
4 years ago

  • Resolution changed from fixed to worksforme

Just changing the resolution to worksforme for accuracy, as it's not quite clear when or where exactly this was fixed.

Note: See TracTickets for help on using tickets.