Skip to content

Commit

Permalink
fix: SVG breaks buton in Safari (#3397)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianthedev authored Nov 11, 2024
1 parent 917065c commit 8868d89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions app/components/avo/button_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,9 @@ def is_not_icon?

def full_content
result = ""
icon_classes = @icon_class
# space out the icon from the text if text is present
icon_classes += " mr-1" if content.present? && is_not_icon?
# add the icon height
icon_classes += icon_size_classes
icon_classes = class_names(@icon_class, "pointer-events-none", icon_size_classes, "mr-1": content.present? && is_not_icon?)

# Add the icon
result += helpers.svg(@icon, class: icon_classes) if @icon.present?
Expand Down
4 changes: 2 additions & 2 deletions app/javascript/js/controllers/loading_button_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default class extends Controller {
<div class="button-spinner">
<div class="double-bounce1"></div>
<div class="double-bounce2"></div>
</div>`;
</div>`

static values = {
confirmationMessage: String,
Expand Down Expand Up @@ -52,6 +52,6 @@ export default class extends Controller {
const { button } = this

button.innerHTML = button.getAttribute('data-original-content')
button.removeAttribute('disabled');
button.removeAttribute('disabled')
}
}

0 comments on commit 8868d89

Please sign in to comment.