зеркало из https://github.com/mozilla/pjs.git
Make ensureSelection check that there is something to select. Bug 213961,
patch by db48x@yahoo.com (Daniel Brooks), r=blake, sr=bzbarsky
This commit is contained in:
Родитель
aa8fa1540c
Коммит
a9b7fc80be
|
@ -498,7 +498,9 @@ function doGrab(iterator, i)
|
|||
|
||||
function ensureSelection(view)
|
||||
{
|
||||
if (view.selection.count == 0) // only select something if nothing is currently selected
|
||||
// only select something if nothing is currently selected
|
||||
// and that there's something to select
|
||||
if (view.selection.count == 0 && view.rowCount)
|
||||
view.selection.select(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -514,7 +514,9 @@ function doGrab(iterator, meter, i)
|
|||
|
||||
function ensureSelection(view)
|
||||
{
|
||||
if (view.selection.count == 0) // only select something if nothing is currently selected
|
||||
// only select something if nothing is currently selected
|
||||
// and if there's anything to select
|
||||
if (view.selection.count == 0 && view.rowCount)
|
||||
view.selection.select(0);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче