Skip to content

RTL text direction #4753

@codokie

Description

@codokie

Steps To Reproduce

To reproduce the bug with a vault item:

  1. Change app language to a language with an RTL script such as Hebrew or Arabic, or enable "Force RTL layout direction" in Android's Developer Settings
  2. Open Bitwarden (and unlock vault)
  3. Create a new login vault item with the following details and save it:
  • Name: not applicable (just type something)
  • Username: _user
  • Password: pass*
  • URL: https://bitwarden.com/ (don't forget the ending slash)
  • Custom field (text): $custom-text@#
  1. Open the newly created vault item and examine its username, password, URL and custom field

To reproduce the bug with the password generator:

  1. Open the password generator
  2. Generate a password which ends or starts with a number or a special character
  3. Copy the generated password and compare it with the displayed password

Expected Result

The username, password, URL, and custom field of a vault item should appear exactly as they were typed.

The generated password that is displayed in the Password Generator should be identical to the copied password.

Actual Result

The details of the vault item appear as follows:

  • Username: user_
  • Password: *pass
  • URL: /https://bitwarden.com
  • Custom field (text): #@custom-text$

Notice that the special characters at the start and end of each field have been reversed (same thing happens with the Password Generator).

Additional Context

The bug most likely happens because the direction of text fields automatically follows the direction of the layout (RTL).

This behavior is unwanted because it causes confusion and error when copying a displayed field visually.

Most websites do not allow passwords or usernames to contain RTL scripts, and when such characters appear in a URL, they must be (percent) encoded. So there is no benefit to apply an RTL direction to such fields.

Note that the RTL text direction is desired in the notes field of a login vault item as well as in a secure note and in the various fields of an identity vault item, because they are more likely to be written from right-to-left. So the current behavior should remain unchanged for them.

Lastly, it should be noted that the password and text fields of a Send are also affected.

UPDATE: It seems that this issue is present in the master password input field as well!

Build Version

2025.1.2

Environment Details

  • OS Version: Android 14

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions