Skip to content

Commit

Permalink
Prevent Craft from selecting the element when clicking Child Me! disc…
Browse files Browse the repository at this point in the history
…losure menu buttons. Bump to 2.0.0-beta.2
  • Loading branch information
mmikkel committed Mar 24, 2024
1 parent 0d12404 commit 0a9f2df
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 2.0.0-beta.2 - 2024-03-25
### Fixed
- Fixes an issue where clicking Child Me! disclosure menu buttons would select the element row

## 2.0.0-beta.1 - 2024-03-24
### Added
- Added Craft 5 compatibility
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mmikkel/child-me",
"description": "Easily create child elements",
"type": "craft-plugin",
"version": "2.0.0-beta.1",
"version": "2.0.0-beta.2",
"keywords": [
"craft",
"cms",
Expand Down
5 changes: 4 additions & 1 deletion src/templates/childme-button.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{% else %}
{# Create a disclosure menu, but neglect to add the [data-disclosure-trigger] attribute to, essentially, lazy-load the menu; otherwise Craft would create a 100 of these on pageload #}
<button type="button"
class="childme-button{{ hidden ? ' hidden' }}"
class="childme-button btn{{ hidden ? ' hidden' }}"
data-icon="plus"
aria-controls="childme-menu-{{ element.id }}"
aria-expanded="false"
Expand All @@ -37,6 +37,9 @@
{% css %}
.childme-button {
color: var(--link-color);
background-color: transparent;
height: auto;
padding: 0;
}
.modal .elements .tableview th[data-attribute="_childme_addChild"],
.modal .elements .tableview td[data-attr="_childme_addChild"] {
Expand Down

0 comments on commit 0a9f2df

Please sign in to comment.