Start a new topic

HtmlDrawable click through not working

I had start develop a new app with Wikitude SDK Android v7

All my test are done on:

  • Huawey Mate 10 lite 
  • Android 7.0
  • EMUI 5.1
and on:
  • Samsung S6 Edge
  • Android 7.0

I had use the HtmlDrawable functionality to open a webpage test, and this works. The problem is related to the click on the button or link inside that seems not work.

the source code of the JS function that add the HtmlDrawable in the scene is:

loadHtmlUrl: function(idTarget,TARGETNAME,urlToLoad){
        World.myIot = new AR.HtmlDrawable(
           { uri: urlToLoad },
           1,
           {
               viewportWidth: 1000,
               viewportHeight: 1000,
               offsetY: 0,
               offsetX: 0,
               scale: 2.5,
               opacity : 0.5,
               horizontalAnchor: AR.CONST.HORIZONTAL_ANCHOR.RIGHT,
               verticalAnchor: AR.CONST.VERTICAL_ANCHOR.TOP,
               clickThroughEnabled: true,
               allowDocumentLocationChanges: true
           }
        );
        World.myIot.uri = urlToLoad;
        World.reset(idTarget,World.myIot);
    },


the Android Studio Logcat output (when i click on the link of the webpage in the HtmlDrawable) is: 

XXXXXXXXXX I/HwSecImmHelper: mSecurityInputMethodService is null
XXXXXXXXXX I/HwSecImmHelper: mSecurityInputMethodService is null
XXXXXXXXXX I/HwSecImmHelper: mSecurityInputMethodService is null
XXXXXXXXXX I/HwSecImmHelper: mSecurityInputMethodService is null
XXXXXXXXXX I/HwSecImmHelper: mSecurityInputMethodService is null
XXXXXXXXXX I/HwSecImmHelper: mSecurityInputMethodService is null
XXXXXXXXXX I/chromium: [INFO:CONSOLE(1)] "Uncaught TypeError: Cannot read property 'dispatchEvent' of null", source: (1)
XXXXXXXXXX I/chromium: [INFO:CONSOLE(1)] "Uncaught TypeError: Cannot read property 'dispatchEvent' of null", source: (1)
XXXXXXXXXX I/chromium: [INFO:CONSOLE(1)] "Uncaught TypeError: Cannot read property 'dispatchEvent' of null", source: (1)
XXXXXXXXXX I/chromium: [INFO:CONSOLE(1)] "Uncaught TypeError: Cannot read property 'dispatchEvent' of null", source: (1)

Some suggestion?




Hi Fabio,


Please try to specify the viewport of the website like this:

<meta name="viewport" content="width=device-width, initial-scale=1">


If the issue persists please provide more information about the website loaded with the HTMLDrawable, preferably the minimal code required for this issue to happen.


It also seems that you set the uri of the HTMLDrawable twice (line 3 and 18 of the sent snippet).


Best Regards,

Alex

Hi,


my webpage use the metatag that you have suggested. 

The webpage that i use for our tests is: TEST PAGE 


I forgot to remove the line 18 in the code (just for testing...)


Thanks in advance for any help that you can provide.


Regards,

Fabio L.

Hi Fabio,


I investigated the issue and it seems like there is some misbehaviour with the viewport meta tag on Android with clicking.

We will try to look into this issue further and fix it.


In my tests removing the viewport meta tag solved the click issue. 


Best Regards,

Alex

Hi Alex,


thanks for your suggestion!


I have done the test on the test webpage without the viewport metatag and seems works! 

I'll update you if we have some problem with the customer webpage.


If you are able to fix this bug, please let me know.



Regards,

Fabio L.

Login or Signup to post a comment