diff --git a/packages/sage-system/lib/inputgroup.js b/packages/sage-system/lib/inputgroup.js index e6c54dc407..2538b42dc0 100644 --- a/packages/sage-system/lib/inputgroup.js +++ b/packages/sage-system/lib/inputgroup.js @@ -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`;