Swipeout not working on Windows 10 surface tablet


#1

Hi,

I’m in the process of making a F7 app ready for Windows 10 (surface book / surface tablet ) and am running into problems getting the swipeout to work. It looks like the swipe-actio is not detected good enough. Sometimes I see a small edge of the red button that should come in view when I swipe, but not more than a few milimeters. Certainly not enough to see the text on the button or being able to press it.

I created a repo on bitbucket that shows the problem.
If you have visual studio 2017 installed, you should be good to go with the repo.

The repo contains the pages of the F7 split view template app. On the main page I added a part of the swipeout examples page.

I’m a bit stuck so anyone who could help me is welcome!

Also if you can’t do nothing with the repo, but are aware of issues with the swipeout on Windows 10 I would be happy to hear from you!

Thanks in advance!

Kind regards,
Johan Beumer


#2

to fix this issue you have to change device detection code so surface is detected as desktop browser, not touchable device


#3

Thnx adasoft for your response!

Do you by any chance have an idea of how I do that?


#4

See touch function in framework7.js es5 build. For test make it returns false

var Support$1 = (function Support() {
  var positionSticky = (function supportPositionSticky() {
    var support = false;
    var div = document.createElement('div');
    ('sticky -webkit-sticky -moz-sticky').split(' ').forEach(function (prop) {
      if (support) { return; }
      div.style.position = prop;
      if (div.style.position === prop) {
        support = true;
      }
    });
    return support;
  }());

  return {
    positionSticky: positionSticky,
    touch: (function checkTouch() {
      return !!(('ontouchstart' in window) || (window.DocumentTouch && document instanceof window.DocumentTouch));
    }()),
...

#5

Hello again,

It’s been a while since I entered this issue as it wasn’t relevant annymore. Unfortunately it is now active again for me. I tried your suggestion adasoft, but that function already returns false for me.

I noticed a difference between mouse/pen and finger handling.
Swiping with the mouse/pen works, with my finger not.

Swiping with the mouse/pen gives the following flow :
Swipeout.handleTouchStart
Swipeout.handleTouchMove
Swipeout.handleTouchEnd

Swiping with my finger gives the following flow :
Swipeout.handleTouchMove
Swipeout.handleTouchStart
Swipeout.handleTouchEnd

So it looks like when swiping with the finger, moving happens before starting which sounds odd to me. Unfortunately I could not find a point where to change something to make it work as well with the mouse/pen as the finger.

Can anyone point me in the right direction or better (for me that is) solve this problem?

I’m using Framework7 V3.6.5.

Any help would be greatly appreciated!

Kind regards,
Johan Beumer