No Code Attached Yet bug
avatar fred-the-coder
fred-the-coder
24 Aug 2021

Steps to reproduce the issue

Use a form with a field of custom type that extends JFormFieldCombo.
Its getOptions() method is returning a list of items.

Expected result

When you click on this field, the list of items is proposed.
While you enter caracters, this list is filtered based on the caracters already typed-in.

Actual result

It works on PC, but not on (at least Android) smartphone.

System information (as much as possible)

Joomla 3.9.10

Additional comments

As stated here, keyCode on Android does not really reflect the exact keyboard key pressed.
https://bugs.chromium.org/p/chromium/issues/detail?id=118639

As a fix, I loaded another JS file, that the one automatically loaded by Joomla (/media/system/js/combobox.js)
and changed in it:
line 145 :
if ((keycode > 47 && keycode < 59) || (keycode > 62 && keycode < 127) || keycode == 32 || keycode == 8)
with
if ((keycode > 47 && keycode < 59) || (keycode > 62 && keycode < 127) || keycode == 32 || keycode == 8 || keycode == 229)
as keyCode was always 229 on different Androir smartphone and browsers while typing on the keyboard.

avatar fred-the-coder fred-the-coder - open - 24 Aug 2021
avatar joomla-cms-bot joomla-cms-bot - change - 24 Aug 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 24 Aug 2021
avatar PhilETaylor
PhilETaylor - comment - 24 Aug 2021

Do you have a example extension with this test case already?

avatar fred-the-coder
fred-the-coder - comment - 24 Aug 2021

Hi Phil,
Please find attached the component where the issue appears.
com_mosoft_blue_marine_v1_0_14__J3.zip
Install it on a Joomla 3.x.
From the backend create some owners (proprietaire, sorry it is in french).
Add a menu link to create a "registre" from the frontend.
Access that menu from the frontend. (You may have to play with permissions here)
The registre is a form with several fields. One of them is a combo box. Where you have to choose an owner from a list. The proposals come from the owners you had created from the backend.
As a reminder, auto-completion of combo field is working on PC but not on Android.

Hope it helps.
Thank you for your follow-up.

avatar Hackwar Hackwar - change - 22 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 22 Feb 2023

Add a Comment

Login with GitHub to post a comment