Fix a failure in js-tests.

Review Request #12826 — Created Feb. 7, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

The tests for the comment dialog were failing in Firefox due to a missed
spy. The problem is that the text editor was calling .focus() on the
jQuery-wrapped element when using plain text editors, but the spy was
looking for the element itself.

This change updates the TextAreaWrapper to call .el.focus() instead
of .$el.focus(). This makes things consistent between plain text areas
and codemirror versions, so the spy works in both cases.

Ran unit tests.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Fix a failure in js-tests.
The tests for the comment dialog were failing in Firefox due to a missed spy. The problem is that the text editor was calling `.focus()` on the jQuery-wrapped element when using plain text editors, but the spy was looking for the element itself. This change updates the `TextAreaWrapper` to call `.el.focus()` instead of `.$el.focus()`. This makes things consistent between plain text areas and codemirror versions, so the spy works in both cases. Testing Done: Ran unit tests.
fd9855f5562d592d0cca95fba35b8318b48368a2 David Trowbridge
reviewboard/static/rb/js/ui/views/textEditorView.es6.js
Loading...