dart-pad icon indicating copy to clipboard operation
dart-pad copied to clipboard

Touch gestures do not work

Open chickenblood opened this issue 5 years ago • 1 comments

Gestures are never recognized in Dartpad.

Steps to reproduce problem

See normal sample app. Try tapping the + button to increment the counter. Clicking with a mouse works, but if you use the app on an iPad in Safari or Chrome, taps are not detected.

This is bad, because I am prototyping home widgets in Dartpad and they are specifically optimized for tablet and gestural interaction. As such, the designer cannot see how they "feel" unless they use the mouse on the desktop (or attach a keyboard to the iPad), which is less than ideal.

Additional info

Browser

Browser:

Safari, Chrome

Version:

Any

Are you using any extensions/plugins that affect website behavior (particularly those that affect iframes, such as ad blockers)?

Are there any warnings or errors in your browser's JavaScript console? If so, paste them below:

[paste warnings or errors here]

Machine

Operating system:

iOS

Version:

13, 14 (any)

Your code

// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file.

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', debugShowCheckedModeBanner: false, theme: ThemeData( primarySwatch: Colors.blue, ), home: MyHomePage(title: 'Flutter Demo Home Page'), ); } }

class MyHomePage extends StatefulWidget { MyHomePage({Key key, this.title}) : super(key: key);

final String title;

@override _MyHomePageState createState() => _MyHomePageState(); }

class _MyHomePageState extends State<MyHomePage> { int _counter = 0;

void _incrementCounter() { setState(() { _counter++; }); }

@override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(widget.title), ), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Text( 'You have pushed the button this many times:', ), Text( '$_counter', style: Theme.of(context).textTheme.headline4, ), ], ), ), floatingActionButton: FloatingActionButton( onPressed: _incrementCounter, tooltip: 'Increment', child: Icon(Icons.add), ), ); } }

DartPad's output

Did DartPad print anything to the console pane? If so, paste it below:

[paste console output here]

If you were running Flutter code, you can also paste an image of the Flutter output directly into this bug report.

chickenblood avatar Oct 18 '20 02:10 chickenblood

We have a few issues involving iPad use (#1417, for example), and just haven't had the engineering bandwidth to investigate them. Your concern is totally valid, and thanks for filing an issue. I can't say for certain when we'll have time to get this on the roadmap, though.

redbrogdon avatar Oct 22 '20 01:10 redbrogdon