Fix scrolling in the text editor in the comment dialog.

Review Request #13929 — Created June 4, 2024 and submitted

Information

Review Board
release-7.x

Reviewers

The fix to prevent accidentally scrolling away from the comment dialog
broke scrolling within the text editor. This change adds some smarts so
we figure out if we're trying to scroll in the text editor and the text
editor is capable of scrolling, we'll allow it, and if not, we'll
continue to swallow the event.

  • Verified that the scroll wheel did not do anything when moused over
    parts of the comment dialog other than the text editor.
  • Verified that the scroll wheel did not do anything when moused over an
    empty text field, in both markdown and plain text modes.
  • Verified that the scroll wheel did not do anything when moused over
    text that did not overflow the text editor in markdown mode.
  • Verified that the scroll wheel scrolled the text editor when working
    with long comments in both markdown and plan text modes.
  • Ran js-tests.
Summary ID
Fix scrolling in the text editor in the comment dialog.
The fix to prevent accidentally scrolling away from the comment dialog broke scrolling within the text editor. This change adds some smarts so we figure out if we're trying to scroll in the text editor and the text editor is capable of scrolling, we'll allow it, and if not, we'll continue to swallow the event. Testing Done: - Verified that the scroll wheel did not do anything when moused over parts of the comment dialog other than the text editor. - Verified that the scroll wheel did not do anything when moused over an empty text field, in both markdown and plain text modes. - Verified that the scroll wheel did not do anything when moused over text that did not overflow the text editor in markdown mode. - Verified that the scroll wheel scrolled the text editor when working with long comments in both markdown and plan text modes. - Ran js-tests.
89842d83e392503d389cb166b61e49b262337355
Description From Last Updated

Modern TypeScript is moving to ... as HTMLElement. The <Type>var is considered legacy.

chipx86chipx86

To be safest, we should use: target.classList.contains('CodeMirror-scroll')

chipx86chipx86
maubin
  1. Ship It!
  2. 
      
chipx86
  1. 
      
  2. Show all issues

    Modern TypeScript is moving to ... as HTMLElement. The <Type>var is considered legacy.

  3. Show all issues

    To be safest, we should use: target.classList.contains('CodeMirror-scroll')

  4. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-7.x (6ac9d68)