When typing the escape key on Flutter web, Flutter performs Navigator.of(context).pop(). How can I disable this functionality?
Here are the scenarios I tested which all resulted in consistent functionality:
- Chrome on Mac, Edge on Windows, and in DartPad 1.20.0
MaterialApp,CupertinoApp, andWidgetsApp- Debug mode and Release mode
I can disable it using WillPopScope, but this also disabled pressing the back button in the browser. I still want to allow users to navigate using the browser, so this is not a viable option.
Side question: Does anyone know why this is default functionality? This is not expected behavior on a website (excluding popup menus).