Press and hold works on desktop, doesn't work on tablet or phone

Dear community,

I've been stuck on this for a few days now and I'm wondering if there's a fix for my problem.

I've created a dashboard template which controls a sunscreen. When I press and hold it via a desktop PC it works fine but when I try to use it on iPad, iPhone, Flip3 5G or basically any other touchscreen it doesn't work. It seems it doesn't register the touch on the display in order to press the button.

It's the right button on the bottom:

Schermafbeelding 2023-02-20 143945

<div class="rounded" style="width: 100%; height: 100%; background-color:#c0392b;">
    <div style="height: 50%" >
        <md-button class="vibrate filled touched smallfont rounded" style="background-color:#c0392b;"  ng-mousedown="send({payload: 1})" ng-mouseup="send({payload: 0})" touchstart="send({payload: 20})"> 
            <div class="center" style="width:auto; height:auto;"><ng-md-icon size="50" style="height: auto; width: auto;" icon="format_align_justify"></ng-md-icon></div>
            <div>omhoog</div>
        </md-button>
    </div>
    <div style="height: 50%">
        <md-button  class="vibrate filled touched smallfont rounded" style="background-color:#c0392b;"  ng-mousedown="send({payload: 2})" ng-mouseup="send({payload: 0})"> 
            <div class="center" style="width:auto; height:auto;"><ng-md-icon size="50" style="height: auto; width: auto;" icon="format_align_justify"></ng-md-icon></div>
            <div>omlaag</div>
        </md-button>
    </div>
</div>

Best regards,
Wesley Franken

Have a look here which descibes how to make a momentary button, ie like your Press and Hold. It works both with mouse and touchscreens.

1 Like

Dude, I was looking for ages for this answer. Thank you very much!

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