mirror of
https://github.com/seejohnrun/haste-server
synced 2025-08-21 06:33:10 -07:00
fixed bug where lifiting mouse outside numbers
This commit is contained in:
parent
4991b394b0
commit
cddb167638
1 changed files with 12 additions and 6 deletions
|
@ -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>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue