[GH #5755] iPad / iPhone and dropdown column type

Tags: #<Tag:0x00007f8b2b034518> #<Tag:0x00007f8b2b0343b0>

Hi Support,

If you look to following the page on an ios device :
https://handsontable.com/docs/6.2.2/demo-dropdown.html

You can see, for example on “chassis” color, it is not possible to scroll the dropdown options because as soon as you put the finger on an option, it select it.

Of course I got the same problem on my application, and many users wants to use it on ipad or ipad pro.

Is there a way to fix this bug ?

I tried 2 things on my side :

1/ replacing in handsontable is the event beforeOnCellMouseDown with a beforeOnCellMouseUp but it only delay to problem a little, the scroll is still broken. More changes in the dropdown implementations are needed i think.

2/ try to toggle the editor option of the column depending of the device

        {
            data: 'visit',
            type: 'dropdown',
            editor: htMobileDropdown(), // returns 'select' if iphone/ipad, else return 'dropdown'
            selectOptions: getSourceVisits,
            source: function (query, process) {

                process(getSourceVisits(query, process));

            },
            strict: true,
            allowInvalid: false
        }

// the getSourceVisits returns an string[] data to bind the both methods.

The 2nd version works nice but i have a new problem with it : when the column is in ‘select’ mode, the afterChange event does not trigger anymore.

Can you help me, maybe with a better solution ?

Thanks

Welcome @smallet

I have reported your issue on our Gthub board at https://github.com/handsontable/handsontable/issues/5755

as soon as we find a fix or a workaround I will let you know.