neos-ui icon indicating copy to clipboard operation
neos-ui copied to clipboard

Improve backend hover selection for nested elements (markHoveredNodeAsHovered)

Open patricekaufmann opened this issue 2 years ago • 0 comments

Description

The class markHoveredNodeAsHovered is not updated correctly. Let's say you have the following html structure whereas all of the elements are elements wrapped for neos editing:

<div class="a">
	<div class="b">
		<div class="c">
		</div>
	</div>
</div>

The markHoveredNodeAsHovered only updates when entering a depth that is deeper than what the user is currently hovering because the used JavaScript event is mouseenter (see initializeContentDomNode.js). That means if the user is currently editing C, the hover class will not be added to B when leaving the mouse from C. It would be sufficient to switch the event to mouseover.

Videos

See the following videos for a comparison between the two event types:

Behaviour with mouseenter:

https://user-images.githubusercontent.com/41791606/171008564-692501da-9ce7-41b1-b47b-a12752275a0e.mp4

Behaviour with mouseover:

https://user-images.githubusercontent.com/41791606/171008577-dc617919-49aa-43a9-b5ae-65d94be69c7d.mp4

patricekaufmann avatar May 30 '22 14:05 patricekaufmann