Skip to content

Commit

Permalink
Merge pull request #14743 from craftcms/bugfix/14736-click-and-dblclick
Browse files Browse the repository at this point in the history
when clicking on A or BUTTON prevent dblclick

Fixes #14736
  • Loading branch information
brandonkelly authored Apr 2, 2024
2 parents 6cd97c6 + 9b7909f commit 52d5fd8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- Fixed a styling issue when editing an entry without any meta fields. ([#14721](https://github.com/craftcms/cms/issues/14721))
- Fixed a bug where the `_includes/nav.twig` template wasn’t marking nested nav items as selected. ([#14735](https://github.com/craftcms/cms/pull/14735))
- Fixed issues with menu options’ hover styles.
- Fixed a bug where double-clicking on an element’s linked label or action button would cause its slideout to open, in addition to the link/button being activated. ([#14736](https://github.com/craftcms/cms/issues/14736))

## 5.0.0 - 2024-03-26

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.

4 changes: 2 additions & 2 deletions src/web/assets/cp/src/js/BaseElementIndexView.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ Craft.BaseElementIndexView = Garnish.Base.extend(
// Enable inline element editing if this is an index page
if (this.elementIndex.isAdministrative) {
this._handleElementEditing = (ev) => {
if (['A', 'BUTTON'].includes(ev.target.nodeName)) {
// Let the link do its thing
if ($(ev.target).closest('a,button').length) {
// Let the link/button do its thing
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/cp/src/js/NestedElementManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ Craft.NestedElementManager = Garnish.Base.extend(
initElement($element) {
if (Garnish.hasAttr($element, 'data-editable')) {
this.addListener($element, 'dblclick,taphold', (ev) => {
if (['A', 'BUTTON'].includes(ev.target.nodeName)) {
if ($(ev.target).closest('a,button').length) {
// Let the link/button do its thing
return;
}
Expand Down

0 comments on commit 52d5fd8

Please sign in to comment.