Comments

droplet created an issue. See original summary.

wim leers’s picture

It's intentional that you cannot edit multiple instances at the same time. It'd be too overwhelming. We'd have to manage two of the floating toolbars, and we can't position both well.

That being said, I think it is a bug that you can't go from quick editing one thing to another: that should not cause errors to be logged to the console.

wim leers’s picture

Status: Active » Postponed (maintainer needs more info)
droplet’s picture

Title: Can't edit multiple instances at same time » quickedit toolbar didn't shown when you edit another field without close current instance
Issue summary: View changes
Status: Postponed (maintainer needs more info) » Active
Issue tags: +JavaScript, +Needs JavaScript testing

Updated IS.

It's intentional that you cannot edit multiple instances at the same time. It'd be too overwhelming. We'd have to manage two of the floating toolbars, and we can't position both well.

Yes. this makes senses. It just needed to close/reset current quickedit toolbar instance and start a new toolbar correctly

wim leers’s picture

Thanks, much better title :)

wim leers’s picture

Title: quickedit toolbar didn't shown when you edit another field without close current instance » QuickEdit toolbar doesn't show when starting to edit another entity without closing the current instance
Issue tags: +Usability

Although that was not quite correct yet. I think this is what you were going for.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

vitalym’s picture

Issue tags: -JavaScript +JavaScript
StatusFileSize
new56.38 KB

I think it would be good to have exact JS error messages mentioned, so people could find this issue easier:

This is from D9

Uncaught TypeError: Cannot read property '0' of undefined
at positionToolbar (EntityToolbarView.js?v=9.0.0-beta2:164)
at underscore-min.js?v=1.9.1:5

This is from D8

Uncaught TypeError: Cannot read property '0' of undefined
at positionToolbar (EntityToolbarView.js?v=8.8.5:191)
at underscore.js:768

and

Uncaught TypeError: Cannot read property 'remove' of undefined
at n.remove (EntityToolbarView.js?v=8.8.5:83)
at n.appStateChange (AppView.js?v=8.8.5:60)

vitalym’s picture

Status: Active » Needs review
StatusFileSize
new6.48 KB

We are using a lot quickedit in such scenarios with paragraphs and paragraphs_frontend_ui module, so here is a patch that makes all those js errors gone with no harm to the existing functionality.

It's intentional that you cannot edit multiple instances at the same time. It'd be too overwhelming. We'd have to manage two of the floating toolbars, and we can't position both well.

Right, and this is not needed. The idea is to have entity based toolbar and its fence instead of global ones by making container ids unique.

Status: Needs review » Needs work

The last submitted patch, 13: quickedit_toolbar_multiple-2815103-13.patch, failed testing. View results

vitalym’s picture

Status: Needs work » Needs review
StatusFileSize
new12.95 KB
new5.71 KB

Adjusted existing tests to respect introduced changes and not fail. Basically css selectors were changed as follows:
#quickedit-entity-toolbar -> .quickedit-toolbar-container

Status: Needs review » Needs work

The last submitted patch, 15: quickedit_toolbar_multiple-2815103-15.patch, failed testing. View results

vitalym’s picture

vitalym’s picture

Here is an alternative fix that only deals with the toolbar's fence which might be missing in this case. This fix does not bring model changes anything and does not require tests to be adjusted.

vitalym’s picture

Status: Needs work » Needs review
BalajiDS’s picture

Issue summary: View changes

Patch #18 works fine in Drupal- 8.8.6

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
spokje’s picture

Project: Drupal core » Quick Edit
Version: 9.3.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.