Skip to content

Commit

Permalink
fix(ui5-input, ui5-multi-combobox): value state popup now aligned pro…
Browse files Browse the repository at this point in the history
…perly in RTL mode (#4310)

Fixes #4363
  • Loading branch information
stbodurov authored and d3xter666 committed Nov 23, 2021
1 parent 6654a6f commit 6c3a09f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/main/src/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -1275,6 +1275,10 @@ class Input extends UI5Element {
return this.placeholder;
}

get _valueStatePopoverHorizontalAlign() {
return this.effectiveDir !== "rtl" ? "Left" : "Right";
}

/**
* Returns the caret position inside the native input
* @protected
Expand Down
2 changes: 1 addition & 1 deletion packages/main/src/InputPopover.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
no-arrow
class="ui5-valuestatemessage-popover"
placement-type="Bottom"
horizontal-align="Left"
horizontal-align="{{_valueStatePopoverHorizontalAlign}}"
>
<div slot="header" class="{{classes.popoverValueState}}" style="{{styles.popoverHeader}}">
{{> valueStateMessage}}
Expand Down
4 changes: 4 additions & 0 deletions packages/main/src/MultiComboBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,10 @@ class MultiComboBox extends UI5Element {
return (this._isFocusInside || this.open) && !this.readonly;
}

get _valueStatePopoverHorizontalAlign() {
return this.effectiveDir !== "rtl" ? "Left" : "Right";
}

get classes() {
return {
popoverValueState: {
Expand Down
2 changes: 1 addition & 1 deletion packages/main/src/MultiComboBoxPopover.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
no-arrow
class="ui5-valuestatemessage-popover"
placement-type="Bottom"
horizontal-align="Left"
horizontal-align="{{_valueStatePopoverHorizontalAlign}}"
>
<div slot="header" class="{{classes.popoverValueState}}" style="{{styles.popoverHeader}}">
{{> valueStateMessage}}
Expand Down

0 comments on commit 6c3a09f

Please sign in to comment.