mirror of
https://github.com/seejohnrun/haste-server
synced 2025-08-21 01:23:09 -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) {
|
||||
lineId = lineId + 1;
|
||||
isDragging = false;
|
||||
if(!isDragging){
|
||||
return;
|
||||
}
|
||||
if(isNaN(lineId)){
|
||||
lineId = app.selectedLines.endLine;
|
||||
}else {
|
||||
lineId = lineId + 1;
|
||||
}
|
||||
updateWindowLineHash(lineId);
|
||||
|
||||
isDragging = false;
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body onmouseup="handleMouseUp(NaN)" >
|
||||
<ul id="messages"></ul>
|
||||
|
||||
<div id="key">
|
||||
|
@ -151,8 +157,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div id="linenos"></div>
|
||||
<pre id="box" style="display:none;" class="hljs" tabindex="0"><code></code></pre>
|
||||
<div id="linenos" onmouseup="handleMouseUp(NaN)"></div>
|
||||
<pre id="box" onmouseup="handleMouseUp(NaN)" style="display:none;" class="hljs" tabindex="0"><code></code></pre>
|
||||
<textarea spellcheck="false" style="display:none;"></textarea>
|
||||
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue