aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bugzillaBugTriage.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/bugzillaBugTriage.js b/bugzillaBugTriage.js
index e2b07aa..7ada462 100644
--- a/bugzillaBugTriage.js
+++ b/bugzillaBugTriage.js
@@ -1702,6 +1702,8 @@ BzPage.prototype.addLogRecord = function () {
myStorage.logs[recKey] = rec;
}
jetpack.storage.simple.sync();
+ } else if (comment === null) {
+ return null;
}
};
@@ -1907,7 +1909,13 @@ function BzPage(doc) {
console.log("logSubmits = " + logSubmits);
if (logSubmits) {
this.dok.forms.namedItem("changeform").addEventListener("submit",
- function () {that.addLogRecord();}
+ function (evt) {
+ if (that.addLogRecord() === null) {
+ // FIXME doesn't work ... still submitting'
+ evt.stopPropagation();
+ evt.preventDefault();
+ }
+ }
,false);
var generateTimeSheetUI = this.dok.createElement("li");