diff --git a/lib/dialogs/prompt.dart b/lib/dialogs/prompt.dart index a60d012..8d3d8db 100644 --- a/lib/dialogs/prompt.dart +++ b/lib/dialogs/prompt.dart @@ -54,6 +54,7 @@ Future prompt([String message = "", String value = ""]) async { c.complete(null); promptDialog.closeDialog(); } else if (e is KeyboardEvent && e.keyCode == KeyCode.ENTER) { + e.preventDefault(); c.complete(input.value); promptDialog.closeDialog(); } diff --git a/pubspec.yaml b/pubspec.yaml index e512869..7cd7051 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,9 +1,9 @@ name: dialog -version: 0.4.0+2 +version: 0.4.1 description: Modern alert, confirm and prompt dialog implementation author: Pavel Dvořák homepage: https://github.com/dvorapa/dialog-dart -documentation: http://www.dartdocs.org/documentation/dialog/latest/index.html#dialog +documentation: environment: sdk: ">=1.11.1 <2.0.0" dependencies: diff --git a/web/index.html b/web/index.html index 5ec5168..0bdf91d 100644 --- a/web/index.html +++ b/web/index.html @@ -5,7 +5,7 @@ - + Dialog.dart