May 04, 2017, 1:21 AM
[CLOSED] Disable or Override Touch Settings
Hello,
We are having an issue with users who use laptops with touchscreens, certain UI elements are displaying differently than non-touchscreen systems. When MsgTarget for a field is set to Qtip, the error message is displayed on the Side when using a touchscreen enabled system. Extjs is overriding the MsgTarget if a touchscreen is detected. This behavior is reasonable for tablets and phones where hovering and displaying a tooltip is not possible, but it is not desirable for a laptop that happens to have a touchscreen but also has a mouse connected.
We would like to have control over when extjs uses touchscreen settings. I have traced the code to the variable Ext.supports.Touch -- this gets set to true or false when the framework is first initialized. The issue is I have not found anyway to override this setting (or the function that sets it) early enough to effect the fields that are created at load time.
Please see the following example. You must test it on a system with a touchscreen or just set Chrome F12 to emulate an iPad or something similar. Leave the field empty and click the button to check validity, the icon shows up to the side of the field. We don't want this icon to show up.
We are having an issue with users who use laptops with touchscreens, certain UI elements are displaying differently than non-touchscreen systems. When MsgTarget for a field is set to Qtip, the error message is displayed on the Side when using a touchscreen enabled system. Extjs is overriding the MsgTarget if a touchscreen is detected. This behavior is reasonable for tablets and phones where hovering and displaying a tooltip is not possible, but it is not desirable for a laptop that happens to have a touchscreen but also has a mouse connected.
We would like to have control over when extjs uses touchscreen settings. I have traced the code to the variable Ext.supports.Touch -- this gets set to true or false when the framework is first initialized. The issue is I have not found anyway to override this setting (or the function that sets it) early enough to effect the fields that are created at load time.
Please see the following example. You must test it on a system with a touchscreen or just set Chrome F12 to emulate an iPad or something similar. Leave the field empty and click the button to check validity, the icon shows up to the side of the field. We don't want this icon to show up.
<%@ Page Language="C#" %>
<!DOCTYPE html>
<html>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:FormPanel runat="server">
<Items>
<ext:TextField runat="server" FieldLabel="Field" AllowBlank="false" MsgTarget="Qtip"/>
</Items>
<Buttons>
<ext:Button Text="Check Valid" runat="server">
<Listeners>
<Click Handler="this.up('form').isValid();">
</Click>
</Listeners>
</ext:Button>
</Buttons>
</ext:FormPanel>
</form>
</body>
</html>
Adding "Ext.supports.Touch = false;" to a script section on the page has no effect because by the time this line runs it is too late.
Last edited by fabricio.murta; May 09, 2017 at 2:32 AM.