Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't open the edit slideout if we are tapholding to drag #14357

Merged
merged 4 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Fixed an error that occurred when adding a new block to a Matrix field with an overridden handle. ([#14350](https://github.com/craftcms/cms/issues/14350))
- Fixed a bug where opening a disclosure menu wasn’t hiding others. ([#14354](https://github.com/craftcms/cms/issues/14354))
- Fixed a bug where non-global custom fields were being shown on the Fields index page when searching. ([#14344](https://github.com/craftcms/cms/issues/14344))
- Fixed a bug where component slideouts would open when long-pressing on a component’s action menu button or drag handle within a component select input.
- Fixed a bug where read/write splitting was always getting disabled for GraphQL POST requests. ([#14324](https://github.com/craftcms/cms/issues/14324))
- Fixed a bug where GraphQL schema edit pages could include empty category headings.
- Fixed a bug where asset slideouts weren’t showing validation errors on the Filename field. ([#14329](https://github.com/craftcms/cms/issues/14329))
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js.map

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/web/assets/cp/src/js/ComponentSelectInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,11 @@ Craft.ComponentSelectInput = Garnish.Base.extend(
}).appendTo($component.find('.chip-actions'));
}

this.addListener($component, 'dblclick,taphold', () => {
this.addListener($component, 'dblclick,taphold', (ev) => {
// don't open the edit slideout if we are tapholding to drag
if (ev.type === 'taphold' && ev.target.nodeName === 'BUTTON') {
return;
}
disclosureMenu.$container.find('[data-edit-action]').click();
});

Expand Down