Closed Bug 1713354 Opened 3 years ago Closed 3 years ago

[Bug] Typing an email to sign into Firefox Sync removes what you typed

Categories

(GeckoView :: General, defect, P1)

Unspecified
Android
defect

Tracking

(firefox91 fixed)

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: kbrosnan, Assigned: m_kato)

Details

Attachments

(1 file)

From github: https://github.com/mozilla-mobile/fenix/issues/19704.

Steps to reproduce

  1. Go to Settings > Turn on Sync
  2. Start typing an email address until you reach the @: "example@"
  3. Observe when typing the email hosting: "example@hosting.com"

Expected behavior

  • You can type your full email address.

Actual behavior

  1. When pressing "h", for the example above, the current text is highlighted and removed.

Device information

  • Device vendor / model and Android version: Android 11, Pixel 3
  • Firefox for Android version: Firefox Nightly (27/05)

https://user-images.githubusercontent.com/1370580/120014516-2a507f80-bfb0-11eb-8622-dd643c8bc5cd.mp4

Change performed by the Move to Bugzilla add-on.

I can reproduce this bug without a custom tab (navigating to accounts.firefox.com) in Nightly and Reference Browser.

I cannot reproduce this on:

  • Chrome Canary (93) with/without Custom Tabs.
  • DuckDuckGo with/without Custom Tabs.
  • Focus (8.15.4 with GV 88)
  • Focus (main branch with GV 90)

Makoto would you have a look at this?

Flags: needinfo?(m_kato)

Kevin, I cannot reproduce this. But I would like to look for accounts.firefox.com's JS code since this script modifies HTML when inputting "@" and any character, do you know where is this code?

Flags: needinfo?(m_kato) → needinfo?(kbrosnan)

I found it in https://github.com/mozilla/fxa/blob/main/packages/fxa-content-server/app/scripts/views/mixins/email-autocomplete-domains-mixin.js

Hmm, this script is unexpected behavior for each browsers when having IME's composing string...

Assignee: nobody → m_kato
Flags: needinfo?(kbrosnan)

One of reasons of this hack seems to be bug 1474137.

https://accounts.firefox.com runs the following script.

input.addEventListener("keyup", () => {
  // Update <datalist>

  temporaryElement.focus();
  input.focus();
}

Since input.focus() is called, GeckoViewSupport sends current value of
focused <input> element to GeckoEditable, but we don't cancel previous
text transaction unfortunately. Then it may cause unexpected behaviours such
as reported issue.

So we should dispose previous text transaction when getting new focus.

Also it is difficult to write unit test for this. Because,

  • Mochitest cannot test this since this issue is native IME behaviour.
  • No way to create this timing on geckoview-junit.
Severity: -- → S3
Priority: -- → P1
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/36657071438c Destroy previous text transactions when Gecko requests to synchronize all text. r=geckoview-reviewers,agi
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: