mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
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:
parent
f76e3889a4
commit
557d5ece5a
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user