Skip to content

Commit

Permalink
Version 1.22.2
Browse files Browse the repository at this point in the history
Mobile keyboards are automatically closed after temperature inputs (xs+sm layouts)
Bug fix: If variables in localStorage were badly initialised their default value was not restored
  • Loading branch information
chrishamm committed Aug 15, 2018
1 parent cc1301a commit 9d65249
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
Binary file not shown.
18 changes: 15 additions & 3 deletions core/js/interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,11 @@ $("#table_tools").on("click", ".heater-temp", function(e) {
gcode += temps.reduce(function(a, b) { return a + ":" + b; });
sendGCode(gcode);

$(this).select();
if (windowIsXsSm()) {
$(this).blur();
} else {
$(this).select();
}
e.preventDefault();
});

Expand Down Expand Up @@ -848,7 +852,11 @@ $("#table_tools").on("keydown", "tr > td > div > input", function(e) {
sendGCode(gcode);
}

$(this).select();
if (windowIsXsSm()) {
$(this).blur();
} else {
$(this).select();
}
e.preventDefault();
}
});
Expand Down Expand Up @@ -1446,7 +1454,11 @@ $("#table_heaters > tbody > tr > td > div > input," +
}
sendGCode(gcode);

$(this).select();
if (windowIsXsSm()) {
$(this).blur();
} else {
$(this).select();
}
e.preventDefault();
}
});
Expand Down
3 changes: 2 additions & 1 deletion core/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ function getLocalSetting(key, defaultValue) {
}

var value = localStorage.getItem(key);
if (value == undefined || value.length == 0) {
if (value == undefined || value.length == 0 ||
(defaultValue != undefined && value.constructor !== defaultValue.constructor)) {
return defaultValue;
}
return JSON.parse(value);
Expand Down
4 changes: 2 additions & 2 deletions core/reprap.htm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Duet Web Control v1.22.1
<!-- Duet Web Control v1.22.2
written by Christian Hammacher
Expand Down Expand Up @@ -2235,7 +2235,7 @@ <h1 class="text-center text-muted">Connect to your Duet to display Filaments</h1
</tr>
<tr>
<th>Web Interface Version:</th>
<td id="dwc_version">1.22.1</td>
<td id="dwc_version">1.22.2</td>
</tr>
</table>
<span id="span_copyright">Web Interface by Christian Hammacher<br/>Licensed under the terms of the <a href="https://www.gnu.org/licenses/gpl-3.0" target="blank">GPL v3</a></span>
Expand Down

0 comments on commit 9d65249

Please sign in to comment.