Dear Community User! We are updating our platform to a new system.
Read more: Important information on the platform change.

cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

Colour change on button press/image on touch panel

Colour change on button press/image on touch panel

David08
Long-established Member

Hello,

I have made an application in WebIq, with different UI Actions that when I press the button/container/image, in Windows version (with mouse) it doesn't change its appearance, but in touch panel it colours the button/image with a blue rectangle. Attached picture.

David08_0-1710338222894.pngDavid08_1-1710338270903.png

I have configured the widgets with CSS Stylesheets.
I know that to change the appearance when the mouse hovers over the widget is with the "hover" property.

I would like to know with which property I can change the colour of the widget on the touch panel while it is clicked. It happens also with other widgets:

David08_2-1710338600168.png

Thanks.

 

4 REPLIES 4

webiq-sk
Frequent Contributor

The cause of the issue is described here:
https://itnext.io/finally-a-css-only-solution-to-hover-on-touchscreens-c498af39c31c

A possible workaround using CSS can be found here:
https://css-tricks.com/solving-sticky-hover-states-with-media-hover-hover/

WebIQ 2.16, which will be released later this year, will use this method instead for its revamped IQ widgets with a corresponding fallback to support older devices:
https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible

 

danielsimila
Established Member

FWIW I had some similar visual issues going from mouse -> touch panel, and if I remember correctly, adding the following snippet to a global .css stylesheet fixed the issue I had. 

body {
    -webkit-tap-highlight-color: unset;
}

 You could try it out on your system and see if this is what you want. 

webiq-sk
Frequent Contributor

Please note that using --webkit-tap-highlight-color is not a standard attribute and will not work on all devices:
https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-tap-highlight-color?retiredLocale=de

 

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist