Fix note highlight being added when you don't have a URL fragment hash #note_xxx
What does this MR do?
- Fix note highlight being added when you don't have a URL fragment hash
#note_xxx
Are there points in the code the reviewer needs to double check?
- Should we massage to boolean a different way? https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12293#note_32956032
Why was this MR needed?
- In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12098, we introduced adding a
.target
to help with the lost highlight on edits. When there isn't a fragment hash in the URL(#note_xxx
), the boolean expression used to toggle the class can evaluate tonull
which jQuery doesn't assume as aforce
parameter and just toggles instead of assuming asfalse
.
Does this MR meet the acceptance criteria?
- Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #33916 (closed)
Edited by username-removed-892863