Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important information on the platform change.

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

Dialog forms

Dialog forms

bostroemc
Occasional Contributor

I have a custom widget that is essentially a form.  Using axios (https://github.com/axios/axios), the widget submits a POST request to the ctrlX Data Layer.  This request is handled by an app on the control, which adds the submitted data ("job request") to a queue.  See attached image webiq_addJobRequestToQueue. The widget itself is contained in a standard WebIQ dialog overlay.

This works fine in almost all contexts. 

The issue I'm having is that when I connect to the WebIQ server using a mobile device, the form input elements are either completely inaccessible or interaction with the elements is "limited".  This issue may be reproduced by adding a WebIQ html widget to a dialog overlay and including a simple form:

webiq_dialog_form.png

On my Android 10 phone the dialog looks like this:

Screenshot_20210716-052032.png

On the other hand, the same html form element displays correctly on a slidein overlay.  See attached.  (I should also note that I do have the attribute "Insert Top-Level" enabled on the dialog element.)

On a Windows or Linux PC,  I have not seen similar issues, either with my own custom widget, or the html form element shown above.  Also, the same issue exists on my phone in Chrome and Firefox.

Does anyone have a clue what's going on?

Sample project attached.

 

2 REPLIES 2

bostroemc
Occasional Contributor

I should add that I did try to debug this issue using Chrome DevTools and a remote connection via adb (https://developer.android.com/studio/command-line/adb), but I didn't see anything that struck me as suspicious.  Maybe this will mean something to a real HTML expert.

 

Bildschirmfoto von 2021-07-15 12-02-49.png

webiq-sk
Frequent Contributor

Hello,

from what I see you are not using a custom widget but simply the HTML widget which contains a normal HTML form source code. As such, the form is embedded directly in the WebIQ app and all styles and events could be handled and/or modified by the framework.

The reason for the behavior in this case is that the WebIQ Visuals framework automatically adds certain listeners on HTML form elements. You can actually reproduce the problem by switching to the mobile view in your desktop browser and you will observe the same behavior;

webiqsk_0-1626677392207.png

If you remove the touchstart listener here it works. But you cannot prevent that from happening as this is done by the framework itself.

Though you can use the HTML widget to integrate specific code into your WebIQ app this should only be used for features that cannot be integrated in any other way. Especially when using HTML form elements this can lead to unexpected behavior as this will have the same scope as framework HTML code.

In your case the recommended WebIQ way would be this:
- create a custom library package with the Axios library (assuming the library works for your project)
- create a custom WebIQ widget that utilizes these widgets to create the form:
   - IQ Input Field
   - IQ Select-Radio
   - IQ Button
- the custom widget JavaScript code would then read the WebIQ widget values and utilizes the Axios library to send the data to the target

Regards,
Sascha Kimmel

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