hof 19.13.4 → 19.13.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -66,9 +66,16 @@ function setupLabels(labels) {
66
66
 
67
67
  function formFocus() {
68
68
  var forms = document.getElementsByTagName('form');
69
+ var getElementFromSummaryLink = window.location.hash.replace(/^#/, '');
70
+ var getEditPath = window.location.pathname.split('/').pop();
69
71
  var labels;
70
72
  var summaries;
71
73
 
74
+ if (getElementFromSummaryLink && getEditPath === 'edit') {
75
+ document.getElementById(getElementFromSummaryLink).focus();
76
+ document.getElementById(getElementFromSummaryLink + '-group').scrollIntoView();
77
+ }
78
+
72
79
  if (forms.length > 0) {
73
80
  labels = document.getElementsByTagName('label');
74
81
  if (labels) {
@@ -11,7 +11,7 @@ function clicked(e) {
11
11
  var elem = helpers.target(e);
12
12
 
13
13
  var groupId = elem.getAttribute('href').replace(/^#/, '');
14
- var group = document.getElementById(groupId);
14
+ var group = document.getElementById(groupId + '-group') || document.getElementById(groupId);
15
15
  var inputs;
16
16
 
17
17
  if (group) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hof",
3
3
  "description": "A bootstrap for HOF projects",
4
- "version": "19.13.4",
4
+ "version": "19.13.5",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
7
7
  "author": "HomeOffice",