Drag-and-drop of a dashboard block not working on a touchscreen PC with a mouse

Hello,

I just noticed that drag-and-drop of dashboard blocks does not work on a touchscreen laptop when using the mouse (you therefore have to switch to touch input). I use an external monitor with an external keyboard/mouse, so whenever I need to reorganize my blocks I switch to touch. It’s not very inconvenient in itself, but I’m still creating a topic to inform touchscreen laptop users of the behavior and it might not be very difficult to fix (or there may be other solutions)

Weird… I have a PC with a touchscreen and both seem to work, as far as I can tell :thinking: I’ll try again today

I confirm that I experienced the same behavior yesterday with a Microsoft Surface…

As for me, it’s the opposite: the PC’s touchscreen doesn’t allow me to do drag & drop, whereas the mouse works perfectly.

Test carried out with Chromium on Ubuntu 22.10

Thanks for the feedback!

Indeed, the case of « hybrid » devices is quite complex.

Drag and drop in browsers is unfortunately not a standard API between touch and mouse; you have to code each case separately.

On my side I use a specific library to handle one case, and another to handle the other, and for now it’s either one or the other — I haven’t implemented a hybrid behavior to switch between them dynamically.

However, I’m surprised that your browsers don’t expose that they are touch-enabled.

Out of curiosity, if you open the browser console (right-click on a page -\u003e inspect element), and run:

'ontouchstart' in window || navigator.maxTouchPoints \u003e 0 || navigator.msMaxTouchPoints \u003e 0

What do you get?

I’m getting false

Ah :sweat_smile:

Can you try this command on other browsers?

I don’t have that computer on hand… I’ll try to run the test tonight or tomorrow.

I’m set to true on Edge and Chrome

False also on Firefox (still on Ubuntu)

Ok, so @qleg and @guim31 the behavior you have is the behavior coded for now:

  • @qleg since your browser exposes that it is touch-enabled, the Gladys front-end chooses to provide the drag-and-drop in touch mode (and not on click; it’s one or the other currently)
  • @guim31 Your browser exposes that it is not touch-enabled, so the Gladys front-end chooses to only provide the mouse interface

In @qleg’s case, development is possible: we’d need to code a mechanism to allow both. We’ll see, this could be simple or it could be a huge undertaking. I can look into it in the coming weeks, but I promise nothing. It’s an edge case that’s really complex, especially since I wouldn’t be able to test it — it would be blind ^^

In @guim31’s case, nothing is possible. If your browser itself doesn’t know that it’s touch-enabled, there’s nothing I can do. You need to investigate; maybe your browsers don’t support touch input on Ubuntu…

1 Like

@pierre-gilles I must admit I joined this thread because, since I have a computer with a touchscreen, I thought it might be useful to get some feedback. But in my use I don’t see the point of using my touchscreen for this kind of drag-and-drop, which is much easier and faster with the mouse :wink:

1 Like