Skip to content

Fake selection is updated regardless of whether it needs to be updated #4536

Closed
ckeditor/ckeditor5-engine
#1792
@Reinmar

Description

@Reinmar

During image resizing the renderer is executed on every change of the image (I'm not sure who triggers the renderer, but it happens, and it just may happen, so let's accept this fact).

Unfortunately, the renderer doesn't check whether fake selection really needs to be updated so on every call it removes the native selection and sets it back in the same place.

This causes serious deoptimization – Chrome blocks rendering thread for a long periods, stacking some selection changes. It only renders (probably) when for a certain period of time it doesn't get any selection change.

Metadata

Metadata

Assignees

Labels

package:enginetype:bugThis issue reports a buggy (incorrect) behavior.type:improvementThis issue reports a possible enhancement of an existing feature.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions