Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FXIOS-8779 - Login autofill not working on certain websites #19490

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

issammani
Copy link
Collaborator

@issammani issammani commented Apr 1, 2024

📜 Tickets

Jira ticket
Github issue

💡 Description

This PR:

📝 Checklist

You have to check all boxes before merging

  • Filled in the above information (tickets numbers and description of your work)
  • Updated the PR name to follow our PR naming guidelines
  • Wrote unit tests and/or ensured the tests suite is passing
  • When working on UI, I checked and implemented accessibility (minimum Dynamic Text and VoiceOver)
  • If needed, I updated documentation / comments for complex code and public methods
  • If needed, added a backport comment (example @Mergifyio backport release/v120)

Comment on lines +341 to +345
public static func yieldFocusBackToField(with tab: Tab) {
let jsFocusCallback = "window.__firefox__.logins.yieldFocusBackToField()"
tab.webView?.evaluateJavascriptInDefaultContentWorld(jsFocusCallback)
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for FXIOS-8690. When we dismiss the bottom sheet we also want to yield focus back to the field and show the accessory view.

Comment on lines +158 to +161
viewController.controllerWillDismiss = { [weak self] in
guard let currentTab = self?.tabManager.selectedTab else { return }
LoginsHelper.yieldFocusBackToField(with: currentTab)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@razvanlitianu to doublecheck

@nbhasin2 nbhasin2 changed the title Fix FXIOS-8779 - Login autofill not working on certain websites. Fix FXIOS-8779 - Login autofill not working on certain websites Apr 1, 2024
@mobiletest-ci-bot
Copy link

Messages
📖 Project coverage: 33.52%
📖 Edited 3 files
📖 Created 0 files

Client.app: Coverage: 32.26

File Coverage
CredentialAutofillCoordinator.swift 77.47%
LoginsHelper.swift 0.0% ⚠️

Generated by 🚫 Danger Swift against b61bb91

@afurlan-firefox
Copy link
Collaborator

Is this one going on 125?

@nbhasin2
Copy link
Contributor

nbhasin2 commented Apr 1, 2024

@afurlan-firefox yes

@mergify backport release/v125

@razvanlitianu razvanlitianu merged commit ed23f41 into mozilla-mobile:main Apr 2, 2024
8 of 10 checks passed
@razvanlitianu
Copy link
Collaborator

@mergify backport release/v125

Copy link
Contributor

mergify bot commented Apr 2, 2024

backport release/v125

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Apr 2, 2024
* fix: simplify code and fix fill issues

* fix: yield focus back to field when bottomsheet is dismissed

(cherry picked from commit ed23f41)
@razvanlitianu
Copy link
Collaborator

razvanlitianu commented Apr 2, 2024

@afurlan-firefox @nbhasin2 we have a recent issue that autofill does not work for 124.3, this can be a possible fix. Should we uplift?

@dsmithpadilla
Copy link
Contributor

@mergify backport release/v124

Copy link
Contributor

mergify bot commented Apr 2, 2024

backport release/v124

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Apr 2, 2024
* fix: simplify code and fix fill issues

* fix: yield focus back to field when bottomsheet is dismissed

(cherry picked from commit ed23f41)
dsmithpadilla pushed a commit that referenced this pull request Apr 2, 2024
…port #19490) (#19501)

* Fix FXIOS-8779 - Login autofill not working on certain websites (#19490)

* fix: simplify code and fix fill issues

* fix: yield focus back to field when bottomsheet is dismissed

(cherry picked from commit ed23f41)

* Fix compile issue

---------

Co-authored-by: Issam Mani <issamouu69@gmail.com>
Co-authored-by: Razvan Litianu <litianu.razvan@gmail.com>
nbhasin2 pushed a commit that referenced this pull request Apr 2, 2024
…port #19490) (#19499)

* fix: simplify code and fix fill issues

* fix: yield focus back to field when bottomsheet is dismissed

(cherry picked from commit ed23f41)

Co-authored-by: Issam Mani <issamouu69@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants