From 75260b6fd3e3b74f8d5bf6c2293d023881c7dd09 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sat, 2 Dec 2017 23:29:20 +0200 Subject: [PATCH] Handle task duration change before focusout --- resources/views/tasks/edit.blade.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/views/tasks/edit.blade.php b/resources/views/tasks/edit.blade.php index f8d059fc6454..2ff848fa7d9a 100644 --- a/resources/views/tasks/edit.blade.php +++ b/resources/views/tasks/edit.blade.php @@ -125,7 +125,7 @@ - + {{ trans('texts.set_now') }} @@ -352,6 +352,11 @@ self.duration.pretty = ko.computed({ read: function() { + // handle the input being changed and the form is submitted before focus out + if ($("input.duration").is(":focus")) { + return $("input.duration").val(); + } + var duration = false; var start = self.startTime(); var end = self.endTime();