Skip to content

Commit fd1b2ff

Browse files
claudisa-uustsnel
authored andcommitted
YDA-6625: scroll to top when submission fails to make sure user sees error
1 parent fad013c commit fd1b2ff

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

datarequest/static/datarequest/js/add.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

datarequest/static/datarequest/js/add.js.LICENSE.txt

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/*
2-
object-assign
3-
(c) Sindre Sorhus
4-
@license MIT
5-
*/
6-
71
/*!
82
Copyright (c) 2018 Jed Watson.
93
Licensed under the MIT License (MIT), see
@@ -12,26 +6,29 @@ object-assign
126

137
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
148

15-
/** @license React v0.19.1
16-
* scheduler.production.min.js
9+
/**
10+
* @license React
11+
* react-dom.production.min.js
1712
*
1813
* Copyright (c) Facebook, Inc. and its affiliates.
1914
*
2015
* This source code is licensed under the MIT license found in the
2116
* LICENSE file in the root directory of this source tree.
2217
*/
2318

24-
/** @license React v16.14.0
25-
* react-dom.production.min.js
19+
/**
20+
* @license React
21+
* react.production.min.js
2622
*
2723
* Copyright (c) Facebook, Inc. and its affiliates.
2824
*
2925
* This source code is licensed under the MIT license found in the
3026
* LICENSE file in the root directory of this source tree.
3127
*/
3228

33-
/** @license React v16.14.0
34-
* react.production.min.js
29+
/**
30+
* @license React
31+
* scheduler.production.min.js
3532
*
3633
* Copyright (c) Facebook, Inc. and its affiliates.
3734
*

datarequest/static/datarequest/js/src/add.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ function submitData(data)
294294
$("#submitButton").text("Submit");
295295
$("#saveButton").text("Save as draft");
296296
$('button:submit').attr("disabled", false);
297+
window.scrollTo({ top: 0, behavior: 'smooth' });
297298
});
298299
}
299300

0 commit comments

Comments
 (0)