title: Swipe over table in mobile browser
body: <p>I and my teammate are writing the game "Battlecity" in dart for mobile browser. The problem is with swipes for tank direction(left to right, right to left, etc) in mobile browser. It works with a great delation(and for some reasond doesn't works in Chrome-Browser). 
  You can see the problem better, if you start the game on your mobile device(just open link with game: <a href="https://javajunikorn.github.io/BattleCity/build/web/html/test.html" rel="nofollow noreferrer">https://javajunikorn.github.io/BattleCity/build/web/html/test.html</a>)
  Interesting thing is, that the problem exists only on swipes over gamefield(in our case it's 27*27 html table). If we're swiping out of gamefeeld, than it works great.</p>
  
  <p>Here is code of our Controller:</p>
  
  <pre><code>class Direction{
  
  
    Point first, last;
    Game game;
  
    void startListening(){
  
  
      window.onTouchStart.listen((ev) {
        last = null;
        first = ev.touches.first.client;
      });
  
      window.onTouchMove.listen((ev){
        last = ev.touches.first.client;
      });
  
      window.onTouchEnd.listen((ev) {
        if(last == null || first.distanceTo(last) &lt; 20)
          game.player.shoot();
        else {
          Point d = first - last;
          if(d.x.abs() &gt; d.y.abs()){
            //Waagerecht
            if( first.x &gt; last.x){
              //links
              game.player.changeDirection(Directions.left);
            }
            else{
              //rechts
              game.player.changeDirection(Directions.right);
            }
          }
          else{
            //Senkrecht
            if(first.y &gt; last.y){
              //Up
              game.player.changeDirection(Directions.up);
            }
            else{
              //Down
              game.player.changeDirection(Directions.down);
  
            }
          }
        }
      });
  
  
      window.onKeyPress.listen((k) {
        //Shoot
        if(k.which == 32) { //spacebar
          game.player.shoot();
        }
        //Up
        if(k.which == 119 || k.keyCode == KeyCode.UP){
          game.player.changeDirection(Directions.up);
        }
        //Down
        if(k.which == 115 || k.keyCode == KeyCode.DOWN){
          game.player.changeDirection(Directions.down);
        }
        //Left
        if(k.which == 97 || k.keyCode == KeyCode.LEFT){
          game.player.changeDirection(Directions.left);
        }
        //Right
        if(k.which == 100 || k.keyCode == KeyCode.RIGHT){
          game.player.changeDirection(Directions.right);
        }
      });
  
    }
  
  }
  </code></pre>