Skip to content

Commit

Permalink
fix: update input group padding
Browse files Browse the repository at this point in the history
  • Loading branch information
QuintonJason committed Sep 16, 2024
1 parent 300471a commit 70325be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/sage-system/lib/inputgroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ Sage.inputgroup = (function() {
inputGroupBtns.forEach(function(btn) {
const parentGroup = btn.closest(".sage-input-group");
const field = parentGroup.querySelector(".sage-input__field");
const parentDir = parentGroup.getAttribute('dir');
const parentDir = btn.closest('html[dir="rtl"]');

if (parentDir === 'rtl') {
if (parentDir) {
field.style.paddingLeft = `${btn.offsetWidth + inputPaddingOffset}px`;
} else {
field.style.paddingRight = `${btn.offsetWidth + inputPaddingOffset}px`;
Expand Down

0 comments on commit 70325be

Please sign in to comment.