SideBySide2: Fix loss of focus during resize of draft comments
In some rare circumstances keyboard focus was being transferred
out of a draft comment textarea during the automatic resize of
the textarea.
Focus transferred due to CM4 being told to resize itself from
a DiffTable header visibility change, which was triggered by
a scroll event from CM4. When CM4 resized it removed the draft
comment widget from the DOM, forcing the browser to "blur". It
then readded the widget before the user noticed it was removed.
(Found using Chrome's developer tools DOM breakpoint feature.)
Rework the logic surrounding the diff table header hiding to
minimize the frequency that the header is hidden/shown.
Change-Id: I873e87b97389d5c6ba582300a38506534cfa3e1a
4 files changed