Dashboard 2.0 workaround for issue #331 - dropdown problem on Android?

Can anyone think of a workaround for ui-dropdown allows keyboard text entry and misbehaves on Android. · Issue #331 · FlowFuse/node-red-dashboard · GitHub? On Android selecting a dropdown pops up a keyboard, which makes it virtually unusable in landscape mode as the keyboard takes a lot of screen so there is little room for the selection. For example:

Even if I close the keyboard it keeps popping up again.

This might be one for the Veutify Discord community.

I see that there is an input element involved in dropdown for regular usage it is not needed/used. The one can add "readonly" attribute for that input. Should suppress keyboard popping up.

I think the correct (modern) way is to apply the inputmode attribute...


... to the input element.

But as this is a vuetify component, that might be tricky without using a $ref to manipulate the element?

@Steve-Mcl @hotNipi are those changes that would need to be made in the dropdown node source?

From a very VERY quick cursory glance I think the dropdown built by veutify employs an input element (possibly for the focusing and/or key typed selection) (IDK) but that is the thing that needs to be told not to pop out the on screen keyboard.

They may already have a way of specifying this in the v-dropdown (I havent looked). It may be possible via a class (at your end)

Thats all i have until i have more time I'm afraid. the Veutify discourse probably has this answered already.

You may try to hack it a bit that way...
Cant currently test on device..

   const dropdowns = document.querySelectorAll('.nrdb-ui-dropdown');   
   for (const d of dropdowns) {
      const input = d.querySelector('input');
      input.setAttribute("readonly", "")      

You, sir, are a genius"!

1 Like

The script should be targeted to be ui-scoped to affect at all pages. (if you have more than one)
My bad. Sorry. Not that genius at all :smiley:

Even a genius may not perfect :slight_smile:

For example, Einstein said for a long time that the theory of quantum mechanics could not be true, but eventually changed his mind.

1 Like

That "spooky action at a distance"?

And the cat.

Dead'n'alive :smiley_cat:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.