Do not pass key events to the drop_list. #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This causes the EditText to lose focus while typing, especially on devices with a hardware keyboard.
PR comments:
This change made it possible for me to use QDict on a device with a hardware keyboard :)
More precisely: on a device with a hardware keyboard every key press would result in the text field losing focus and the first item of the drop_list. A workaround was to use the virtual keyboard. However, the issue sometimes also occurred when using the virtual keyboard.
To be honest, I don't understand the purpose of passing they key events to the
drop_list
. It seems impossible to select any item from the drop_list while typing in the EditText, so it doesn't make much sense to check fordrop_list.selectedItemPosition.
Moreover, the whole condition from the
if
will usually evaluate totrue
for any key, regardless of the drop list state. Perhaps you meant&&
instead of||
, but I still don't get your intention.