question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] [Android] Calling Unfocus on Entry has no effect

See original GitHub issue

Description

Calling Unfocus() on an Entry has no effect. The Entry will stay focused and the keyboard won’t be dismissed.

Note

In my opinion, the focus behavior of the Entry is weird. Even after navigating to another view of the application, the keyboard won’t be dismissed and the Unfocused event won’t get fired.

Steps to Reproduce

  1. Add an Entry to a view
  2. Call Unfocus() on the Entry in the Completed handler

Expected Behavior

The Entry loses the focus and the keyboard gets dismissed.

Actual Behavior

Nothing happens. The Unfocused event does not get fired.

Basic Information

  • Version with issue: 6.0.101-preview.10.2068
  • Last known good version: -
  • IDE: Visual Studio 2022 Version 17.1.0 Preview 1.0
  • Platform Target Frameworks:
    • Android: 28

Screenshots

Expected

image

Actual

image

Reproduction Link

The issue is present here

Workaround

Setting Entry.IsEnabled to false and immediately to true again unfocuses the Entry and closes the keyboard

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
jsuarezruizcommented, Nov 15, 2021

Focusable logic is still not implemented. Will be available in upcoming Previews.

1reaction
mas985commented, Dec 9, 2021

I understand it is not yet implemented. I was wondering if/when it might be implemented as it was mentioned that it will be available in upcoming previews but that was 24 days ago.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Entry control focus unfocus event triggering randomly ...
Issue: Whenever i try to enter number the expected behaviour is to trigger the text_changed but it is triggering the unfocus and focus...
Read more >
AutoCompleteView.Unfocus not fire Unfocused event
Unfocus () has no effect on controller, even Unfocused event is not hit. i am doing this because i want to hide Android...
Read more >
Change focus behavior | Jetpack Compose
Redirect focus upon entry or exit​​ If there are no focusable items available, the focus doesn't move anywhere, but stays on Clickable 3...
Read more >
Understanding Flutter's keyboard focus system
Flutter comes with a focus system that directs the keyboard input to a ... If this attribute is false, then calling requestFocus on...
Read more >
Focusing: focus/blur
The focus event is called on focusing, and blur – when the element loses the focus. Let's use them for validation of an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found