plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
246 stars 186 forks source link

Paste-Button doesn't get active after reloading page/navigating to different page. #2024

Closed dhavlik closed 1 year ago

dhavlik commented 7 years ago

BUG

What I did:

In a vanilla plone instance (5.0.8) go to folder contents view, select one item, click on copy and reload the page.

What I expect to happen:

Paste-button is active.

What actually happened:

Paste-button stays inactive.

What version of Plone/ Addons I am using:

Plone 5.0.7 also reproduceable in 5.0.x branch.

Cause/Workaround

It seems that the disabled-status of the buttons do not get updated on a page load. There is a Javascript function "updateButtons" which checks if there is something in the clipboard, and then removes the disabled class from the button.

This function is not called when the page loads, but when the selected items change. If you navigate to another folder, after selecting and deselecting an item, the disabled-class gets removed.

Workaround in my production instance was to add a call "self.app.updateButtons();" in Line 71852 of ++plone++production/logged-in.js (ActionMenu.render).

jensens commented 1 year ago

I close the issue, because it addresses a Plone version that is no longer supported. If you think this is wrong please reopen the issue and assign a matching milestone.