Skip to content

Commit a9f98d2

Browse files
author
p01
committed
Fix for DFL-3708, Keyboard navigation scrolls the view before its necessary, sometimes scrolls selected item out of view
Also, use the clientHeight of the container to account for the height of the horizontal scrollbar
1 parent 6089e50 commit a9f98d2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/resource-manager/resource_service.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ cls.ResourceInspector = function(network_logger)
280280
var container = this.tree_view.get_container().firstChild;
281281
var y = container.scrollTop;
282282
var max_y = e.offsetTop;
283-
var min_y = max_y + e.offsetHeight - container.offsetHeight;
283+
var min_y = max_y + e.offsetHeight - container.clientHeight;
284284

285285
if (y < min_y)
286286
container.scrollTop = min_y;
@@ -312,17 +312,18 @@ cls.ResourceInspector = function(network_logger)
312312
{
313313
this.highlight_resource(uid);
314314
this.detail_view.show_resource(uid);
315+
return true;
315316
}
316317
};
317318

318319
this.highlight_next_resource_bound = function()
319320
{
320-
this._highlight_sibling_resource(-1);
321+
return !this._highlight_sibling_resource(-1);
321322
}.bind(this);
322323

323324
this.highlight_previous_resource_bound = function()
324325
{
325-
this._highlight_sibling_resource(1);
326+
return !this._highlight_sibling_resource(1);
326327
}.bind(this);
327328

328329
this._resource_request_update_bound = function(msg)

0 commit comments

Comments
 (0)