diff --git a/HISTORY.md b/HISTORY.md
index c6947766..66a4e16f 100755
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -5,14 +5,16 @@
* **Notable Changes:**
* 2D lists inside ITEM OF now have the right order of dimensions (rows, columns, planes, etc.)
* enhanced MIN and MAX to also operate on text
- * added "is _ identical to _ ?" to relabel options of equals
+ * added "is _ identical to _ ?" to relabel options of equals
+ * enabled scientific notation in numeric text fields
* **Notable Fixes:**
* don't show internal "compile" reporter in search results
* **Documentation Updates:**
* updated manual with hyper-semantics of ITEM OF, thanks Brian!
### 2021-02-10
-* objects: added "is _ identical to _ ?" to relabel options of equals
+* objects: added "is _ identical to _ ?" to relabel options of equals
+* morphic: enable scientific notation in numeric text fields
### 2021-02-09
* lists: refactored matrix ops to avoid JS stack overflows
diff --git a/snap.html b/snap.html
index 032e28c0..21c871c4 100755
--- a/snap.html
+++ b/snap.html
@@ -5,7 +5,7 @@
Snap! 6.6.0 - dev - Build Your Own Blocks
-
+
diff --git a/src/morphic.js b/src/morphic.js
index bb2e02be..abb40b1e 100644
--- a/src/morphic.js
+++ b/src/morphic.js
@@ -1280,7 +1280,7 @@
/*global window, HTMLCanvasElement, FileReader, Audio, FileList, Map*/
-var morphicVersion = '2021-January-30';
+var morphicVersion = '2021-February-10';
var modules = {}; // keep track of additional loaded modules
var useBlurredShadows = true;
@@ -5637,13 +5637,15 @@ CursorMorph.prototype.processInput = function (event) {
// filter invalid chars for numeric fields
function filterText (content) {
var points = 0,
+ hasE = false,
result = '',
i, ch, valid;
for (i = 0; i < content.length; i += 1) {
ch = content.charAt(i);
valid = (
('0' <= ch && ch <= '9') || // digits
- (i === 0 && ch === '-') || // leading '-'
+ (ch.toLowerCase() === 'e') || // scientific notation
+ ((i === 0 || hasE) && ch === '-') || // leading '-' or sc. not.
(ch === '.' && points === 0) // at most '.'
);
if (valid) {
@@ -5651,6 +5653,9 @@ CursorMorph.prototype.processInput = function (event) {
if (ch === '.') {
points += 1;
}
+ if (ch.toLowerCase() === 'e') {
+ hasE = true;
+ }
}
}
return result;