Skip to content

Commit a9a23af

Browse files
authored
fix(rtl): fix rtl back button default (#17109)
Closes #15357
1 parent 3aaf87a commit a9a23af

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/src/components/back-button/back-button.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,13 @@ export class BackButton implements ComponentInterface {
7272

7373
render() {
7474
const defaultBackButtonText = this.mode === 'ios' ? 'Back' : null;
75-
const backButtonIcon = this.icon != null ? this.icon : this.config.get('backButtonIcon', 'arrow-back');
7675
const backButtonText = this.text != null ? this.text : this.config.get('backButtonText', defaultBackButtonText);
7776

77+
let backButtonIcon = this.icon != null ? this.icon : this.config.get('backButtonIcon', 'arrow-back');
78+
if (backButtonIcon === 'arrow-back' && document.dir === 'rtl') {
79+
backButtonIcon = 'arrow-forward';
80+
}
81+
7882
return (
7983
<button
8084
type="button"

0 commit comments

Comments
 (0)