Adobe-Consulting-Services / acs-aem-commons

http://adobe-consulting-services.github.io/acs-aem-commons/
Apache License 2.0
453 stars 600 forks source link

Limiting the parsys does not work when doubleclicking into the dropzone to add a new component #1360

Closed kwin closed 6 years ago

kwin commented 6 years ago

Required Information

Expected Behavior

The limiting of the parsys should prevent adding new components if the limit would be exceeded then.

Actual Behavior

The alert with a warning that the limit of number of components is reached in the parsys does work when clicking in the edit bar on either "+" or paste (if a component is in the clipboard) but it does not prevent adding a component which is being inserted via double-click in the dropzone.

Steps to Reproduce

Just try to limit a parsys on an arbitrary page and then try to insert components via double-clicking in the dropzone.

kwin commented 6 years ago

The trigger for the insert component dialog is the method _onFastDblClick in /libs/cq/gui/components/authoring/editors/clientlibs/core/js/edit/edit.Toolbar.js. Therefore I think the limiter should rather overwrite Granite.author.edit.actions.actions.INSERT.execute.