[rulers addon] Fix bug where rulers cause unnecessary vertical scroll

Issue #2439