Skip to content

Fix regression from 'fix-ui-height-calc'

Description

Closes issues: Related issues:

There was a regression in !379 (merged), causing a white area to be added whenever you opened a Work log which had any messages.

Background for this was that the scrollIntoView behavior also scrolled the main viewport, in addition to the list itself.

Since this is a regression that's not in a release it does not require documentation.

Notes to reviewer

The solution is based upon this answer https://stackoverflow.com/a/52835382 , although I must admit that I'm a bit unsure why it works (or why it's an issue to begin with). https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView isn't very detailed. My theory is that nearest makes it stop the scrolling process earlier, and never thinks it needs to scroll the viewport to get it into view.

Type of change

Application (affects UI or general functionality):

  • New feature
  • Bug fix
  • Improvement

Ops / admin / CI related only (not impacting users):

  • New feature
  • Bug fix
  • Improvement

Tests

General

  • Tests have been added that prove my fix is effective or that my feature works
  • Related tests have been modified/removed

Hypothesis testing:

  • Soak testing has been done
  • Distribution between positive / negative cases has been checked

Database

  • Includes changes to database schema
  • Includes necessary database migrations

Configuration

  • Includes changes to configuration
  • Includes configuration migration instructions in documentation

Merge checklist

  • Self-review of code performed
  • Feature review against specification (if applicable)
  • Need for documentation has been evaluated and, if necessary, updated
  • Code and implementation is reviewed by other core developer (all changes, inc. changes based on initial review)
Edited by Morten C. Eike

Merge request reports