fixed bug where lifiting mouse outside numbers

This commit is contained in:
Colin 2024-07-23 14:42:01 -07:00
commit cddb167638

View file

@ -121,16 +121,22 @@
} }
function handleMouseUp(lineId) { function handleMouseUp(lineId) {
if(!isDragging){
return;
}
if(isNaN(lineId)){
lineId = app.selectedLines.endLine;
}else {
lineId = lineId + 1; lineId = lineId + 1;
isDragging = false; }
updateWindowLineHash(lineId); updateWindowLineHash(lineId);
isDragging = false;
} }
</script> </script>
</head> </head>
<body> <body onmouseup="handleMouseUp(NaN)" >
<ul id="messages"></ul> <ul id="messages"></ul>
<div id="key"> <div id="key">
@ -151,8 +157,8 @@
</div> </div>
</div> </div>
<div id="linenos"></div> <div id="linenos" onmouseup="handleMouseUp(NaN)"></div>
<pre id="box" style="display:none;" class="hljs" tabindex="0"><code></code></pre> <pre id="box" onmouseup="handleMouseUp(NaN)" style="display:none;" class="hljs" tabindex="0"><code></code></pre>
<textarea spellcheck="false" style="display:none;"></textarea> <textarea spellcheck="false" style="display:none;"></textarea>
</body> </body>