wade blocks my whole application
bart73

Hello

i put memory game inside my webapp and <div id="wade_main_div" tabindex="1"> blocks my rest divs.

Buttons are unclickable

can you help me?

what exactly i need to do for unlock my divs?

thx

Bart

 

All 5 Comments
Gio
Hi bart and welcome to the forums

What happens is that WADE intercepts all the input events and stops the browser from receiving them. This is the default behavior because say that you are making a keyboard-controlled game, you want your character to jump when you press the up arrow, but you normally don't want the page to scroll up at the same time, if that makes sense.

You have two options:

1) Call wade.cancelInputEvents(false)
This will let the browser receive all input events after they've been processed by WADE

2) Put your WADE app inside an iframe.
This way WADE will only receive events that happen inside the iframe and will not even see events that happen on the rest of your page.

I'd go with number 2 as it's cleaner, but it's just personal preference.

I hope this helps, but let us know if there are any problems.
bart73

I forgot to add the lock applies to ipad

on computer it works well

Bart73

Gio
Does the memory sample page work properly on your iPad? (which iPad/iOS version is it btw?)

That page uses method #2 (iframe)
bart73

HejGio

 

thx for your help so much

 

I read wade.cancelInputEvents(false);

and works well but 2 things

 

first it works just into safari, when i create favorit icon on screen and then open it with full large without tabs, etc. it is still locked but directly in safari works well

second during memo game when i touche cards there are some flashes i think it is becouse wade div

 

idont prefere iframes i didnt applay this

 

tested on ipad3

Gio

Regarding the flashes, it may just be a css style issue. This is normally not a problem as it's taken care of in the default style.css, but I think you must be using your own style sheet if the app is integrated into a web page. Make sure that your wade div has this in its style:

-webkit-tap-highlight-color: rgba(255, 255, 255, 0);

In fact I'd also include this, just in case you care about people using Internet Explorer:

-ms-touch-action: none;

The problem you describe with saving it as a standalone web app with the favorite icon and all that - I haven't seen that happen before. I'll try to reproduce it here.

Post a reply
Add Attachment
Submit Reply
Login to Reply