Quickedit was not rightly positionned since my upgrade to D9. After investigating, it is because the referenceElement defined is not whas is expected by Popper in certain cases.

Popper expects a DOM element or virtual element for the reference element.

This reference element is searched in the position() function of EntityToolbarView.js.

If we reach default, then we properly have a DOM element, but for cases 1, 2 or 3 we are sending an element from the model.

It seems that retrieving the DOM element from those objects solves the issue. I am not sure about case 0, as I didn't manage to trigger such a case

Comments

vdsh created an issue. See original summary.

vdsh’s picture

Status: Active » Needs review
StatusFileSize
new2.71 KB

Let's see already what the test bot says.

vdsh’s picture

Title: Quickedit: referenceElement is invalid for the popper library » Quickedit: referenceElement is invalid for the popper library / Toolbar incorrectly positioned
vdsh’s picture

StatusFileSize
new2.75 KB

Previous patch did not apply...

gauravvvv’s picture

StatusFileSize
new2.8 KB
new694 bytes

re-rolled patch #4, fixed cs errors.

vdsh’s picture

Thanks for re-rolling the patch. I admit that I didn't understand the error message (and it worked internally)...

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

spokje’s picture

Project: Drupal core » Quick Edit
Version: 9.4.x-dev » 1.0.x-dev
Component: quickedit.module » Code

Due to Quickedit being moved out of Drupal Core and into a Contrib Module, moving this issue to the Contrib Module queue.