osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.59k stars 1.01k forks source link

Creating OSM note doesn't focus on the input field/show keyboard with offline editing disabled #20671

Open HellMapGoesCoding opened 3 weeks ago

HellMapGoesCoding commented 3 weeks ago

Description

As per title. Searched previous issues and it seems to be unintentional and regression of #10871 #10909 ?

Edit: Added "with offline editing disabled" to the title after discovering this below.

Steps to reproduce

Edit: Disable "offline editing" in OSM plugin settings.

Access adding OSM note by whatever means to see the "internim dialog".

Actual result

Input field is not focused and the keyboard is not visible.

Expected result

Input field focused, keyboard shown.

Your Environment (required)

OsmAnd Version: 4.8.6 / edit: nightly on 26 Aug 2024
Android/iOS version: Android 14
Device model: Pixel 7
Crash-Logs: -
yuriiurshuliak commented 2 weeks ago

The bug was not reproduced. When a new OSM note is created, the note dialog opens, and the text input field is automatically focused, causing the Android keyboard to appear without needing to tap the input box.

Could you test this on the nightly version? Here's the link: https://osmand.net/docs/versions/nightly_versions#nightly-builds.

OsmAnd~ 4.9.0#3071m, released: 2024-08-25

https://github.com/user-attachments/assets/f8c7e977-e670-4676-b4b4-7bf5ccf693fc

HellMapGoesCoding commented 2 weeks ago

It does indeed work on nightly. But the default settings nightly note interface was different for me. It doesn't have the anonymous note toggle or account info. So I compared how release is different to nightly and it appears to be the "offline editing" setting for the OSM plugin that I have disabled on the release version (I don't remember, that might have been the default ages ago).

For reference, on release build with offline editing disabled:

https://github.com/user-attachments/assets/8fe2ec9a-76fd-4cf1-8d25-ad5ebe1f4da1

If I enable offline editing, then the anonymous toggle and account info disappears and the text box is focused as expected like in your screencap.

Is the offline-disabled editing non-focusing behaviour intentional?

yuriiurshuliak commented 1 week ago

Yes, you are right. When the "Offline editing" function is disabled, the bug is reproducible.

As a result, with "Offline editing" disabled, when the note dialog box opens, the text input field does not automatically focus, preventing the Android keyboard from appearing. This requires manually tapping the input field to activate the keyboard.

OsmAnd~ 4.9.0#3104m, released: 2024-09-02

https://github.com/user-attachments/assets/07e984a5-b041-4aa9-9edf-49191d1e0728

vshcherb commented 18 hours ago

We can focus on the fields at least on supported Android devices as we do with other Dialogs ...