mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
(trunk web) #4460 "Weird behavior when using up/down keys" -- fixed.
This commit is contained in:
@@ -487,22 +487,16 @@ Transmission.prototype =
|
||||
{
|
||||
var last = this.indexOfLastTorrent(),
|
||||
i = last,
|
||||
anchor = this._shift_index;
|
||||
anchor = this._shift_index,
|
||||
r,
|
||||
min = 0,
|
||||
max = rows.length - 1;
|
||||
|
||||
if (dn && (i+1 <= max))
|
||||
++i;
|
||||
else if (up && (i-1 >= min))
|
||||
--i;
|
||||
|
||||
if (dn)
|
||||
{
|
||||
if (i === -1) // no selection yet
|
||||
i = 0;
|
||||
else
|
||||
i = (i+1) % rows.length;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i === -1) // no selection yet
|
||||
i = rows.length - 1;
|
||||
else
|
||||
i = (i || rows.length) - 1;
|
||||
}
|
||||
var r = rows[i];
|
||||
|
||||
if (anchor >= 0)
|
||||
|
||||
Reference in New Issue
Block a user