Skip to content

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?

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 to null which jQuery doesn't assume as a force parameter and just toggles instead of assuming as false.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #33916 (closed)

Edited by username-removed-892863

Merge request reports