diff --git a/js/sr2ini.js b/js/sr2ini.js index 94a2646..af55325 100644 --- a/js/sr2ini.js +++ b/js/sr2ini.js @@ -31,13 +31,13 @@ function handleBlur (e) { return false; } - // did value stay the same? do nothing then - if ( e.target.value == $tr.attr("data-ini") ) { + // did Ini value stay the same? do nothing then + if ( $tr.find(".combIni")[0].value == $tr.attr("data-ini") ) { return true; } - // value changed => reposition row - $tr.attr("data-ini", e.target.value); + // Ini value changed => reposition row + $tr.attr("data-ini", $tr.find(".combIni")[0].value); let $trc = $tr.clone(true); $tr.remove(); insertCombRow($trc); @@ -115,7 +115,7 @@ console.log("I/D/R: " + ini + "/" + dice + "/" + rea); } // invalidate if value for ini doesn't align with values for dice+rea - if ( ini != "" && dice != "" && rea != "" ) { +/* if ( ini != "" && dice != "" && rea != "" ) { let d = parseInt(dice); let r = parseInt(rea); if ( ini < d+r || ini > d*6+r ) { @@ -124,7 +124,7 @@ console.log("I/D/R: " + ini + "/" + dice + "/" + rea); inputElements[1].setCustomValidity(""); return false; } - } + }*/ // ok fine return true;