History WebUI: fix out of bound index error when deleting history item
When a history item is removed, we want to move the focus to next menu button. This was done by updating the items and focusing on the item with the same index. When removing the last item, this was causing an error since the index is now out of bounds of the items. This CL focuses on the new last item if there is one. Fixed: 1055956 Change-Id: I41934486f01c1c10afcf34a296585cb23d955592 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2073149 Commit-Queue: Esmael Elmoslimany <aee@chromium.org> Reviewed-by:Demetrios Papadopoulos <dpapad@chromium.org> Cr-Commit-Position: refs/heads/master@{#744745}
Showing
Please register or sign in to comment