Closed Bug 1602305 Opened 6 years ago Closed 2 years ago

Caret is not visible in textbox (Firefox RTL)

Categories

(Core :: DOM: Editor, defect, P2)

71 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1539720

People

(Reporter: mvocom, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:71.0) Gecko/20100101 Firefox/71.0

Steps to reproduce:

Firefox RTL (Hebrew).
Set the System input language to a RTL one.
Set focus to the urlbar or searchbar.
Press Ctrl+Shift to move the caret to the left.
Start typing.

Actual results:

The caret is not visible at all.
There have been issues with the caret for a long time. But this is a major regression in FF 71.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Address Bar

(In reply to Release mgmt bot [:sylvestre / :calixte / :marco for bugbug] from comment #1)

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

It's Address Bar, Search Bar and possibly more TextBoxes.

Itiel, do you know by chance if this is a common problem in RTL or related to some specific setting?

Flags: needinfo?(itiel_yn8)

I can reproduce this. I'm guessing that this is due to a missing padding on the left side (bug 1322542 may fix that, need to confirm locally).
Anyway, keeping the ni? on myself to check for the regression range.

Regressed by bug 1548198.
And yes, the patch in bug 1322542 fully fixes it (if I change margin-left: 2px to padding-left: 3px) for the urlbar.

Yaron, can you verify this looks okay on normal textboxes? I can't reproduce it here on bugzilla, for example.

Flags: needinfo?(itiel_yn8) → needinfo?(mvocom)
Regressed by: 1548198
Has Regression Range: --- → yes

This also reproduces:

  1. when typing RTL characters on LTR build, without Ctrl+Shifting (i.e. caret on the default left side)
  2. when overflowing the input field with RTL characters.

The patch in bug 1322542 does not fix issue in these scenarios.

Keywords: regression

(In reply to Itiel from comment #5)

Regressed by bug 1548198.
And yes, the patch in bug 1322542 fully fixes it (if I change margin-left: 2px to padding-left: 3px) for the urlbar.

padding-left indeed solves the problem.

Yaron, can you verify this looks okay on normal textboxes? I can't reproduce it here on bugzilla, for example.

In many TextBoxes the caret is partially hidden.
Try Preferences -> Privacy -> Manage Cookies.
(Move the caret to the left and type in Hebrew).


Another interesting regression:
.searchbar-textbox { direction: ltr !important; }

You can't move the caret to the right.
If I'm not wrong, it was possible prior to 71.


What do you think about my suggestion in Bug 1602471?

Thank you.

Flags: needinfo?(mvocom)

The priority flag is not set for this bug.
:adw, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(adw)
Assignee: nobody → itiel_yn8

Thank you Itiel.

Itiel, is this patch ready for review?

Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(adw)
Priority: -- → P2

(In reply to Drew Willcoxon :adw from comment #11)

Itiel, is this patch ready for review?

Sort of. The patch works, but I'm not sure it's the right approach.
It's in a feedback-required kind-of-state.

Severity: normal → S3

The following patch is waiting for review from an inactive reviewer:

ID Title Author Reviewer Status
D58148 Bug 1602305 - WIP - Add padding to the urlbar-input on sides where the fading effect is not active itiel_yn8 mak: Resigned from review

:itiel_yn8, could you please find another reviewer or abandon the patch if it is no longer relevant?

For more information, please visit auto_nag documentation.

Flags: needinfo?(itiel_yn8)
Attachment #9117575 - Attachment is obsolete: true
Assignee: itiel_yn8 → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(itiel_yn8)

Is investigating this at the editor level a more-appropriate place?

Component: Address Bar → DOM: Editor
Product: Firefox → Core
  1. when typing RTL characters on LTR build, without Ctrl+Shifting (i.e. caret on the default left side)

I can reproduce this too. It seems that this is a bug of the default widget theme of <input> issue? (moving the caret to right shows caret between RTL characters.)

Flags: needinfo?(emilio)

Oh, if the UI style or the keyboard layout is RTL, X of caret is moved to left at computing the painting region:
https://searchfox.org/mozilla-central/rev/ce049e593c7d062a039938cabccaab4c14b8ebfd/layout/base/nsCaret.cpp#910,914,930,947

That may cause overflow the caret from <input> in LTR UI.

How is it a theming issue? The URL bar doesn't use native widgets. Can someone attach a test-case that repros on web content?

Flags: needinfo?(emilio)

I can reproduce this with data:text/html,<input> too (with typing an RTL character in LTR environment).

Flags: needinfo?(emilio)
Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1539720
Flags: needinfo?(emilio)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: