Content
View differences
Updated by Judith Roth 7 months ago
### Background
1. In a discussion it is quite common to reference/link older comments so that you can provide context to your message. Clicking such links sometimes do not scroll to the correct position.
2. Whenever the URL anchor hash is updated in the url (ie. the url changes from `.../work_packages/294/activity` to .`../work_packages/294/activity#comment-536`, a page reload will not be triggered and the element is not scrolled into the page.
###
### Steps to reproduce
1. Login as a user with permissions view work package comments
2. On a give comment, click on the "more (...)" menu to "copy link to clipboard"
1. Add a new comment referencing the comment in (2) with a link to it in it's content, and submit- simulating a referencing/linking to other comments.
2. Click on the comment link in 2.(a)
3. On a given comment, click on it's timestamp so that it's scrolled into view and briefly highlighted
1. Take note of the comment ID. E.g. for [https://qa.openproject-edge.com/projects/kabirus-test-project/work\_packages/9720/activity#comment-228425](https://qa.openproject-edge.com/projects/kabirus-test-project/work_packages/9720/activity#comment-228425) the comment id is "228425"
2. Click on another comment such that the comment id changes, take note of that comment ID
4. Now, manually change the comment ID on the browser URL to the one in 3.(a)
### Steps to reproduce (alternative)
1. Login and open a work package that has comments
2. Click on three dots on a comment and select Copy link to clipboard
3. Enter the link in the browser
### What is the buggy behavior?
1. Upon clicking on comment reference/link, the reference comment is not scrolled into view and highlighted
2. The target highlight does not change whenever the comment ID is changed without reloading the whole page
### What is the expected behavior?
1. Clicking on comment reference/link should scroll the comment into view and highlight it
2. Changing the comment id in the URL (and clicking Enter) should update the target element- following browser native behavior
###
1. In a discussion it is quite common to reference/link older comments so that you can provide context to your message. Clicking such links sometimes do not scroll to the correct position.
2. Whenever the URL anchor hash is updated in the url (ie. the url changes from `.../work_packages/294/activity` to .`../work_packages/294/activity#comment-536`, a page reload will not be triggered and the element is not scrolled into the page.
###
### Steps to reproduce
1. Login as a user with permissions view work package comments
2. On a give comment, click on the "more (...)" menu to "copy link to clipboard"
1. Add a new comment referencing the comment in (2) with a link to it in it's content, and submit- simulating a referencing/linking to other comments.
2. Click on the comment link in 2.(a)
3. On a given comment, click on it's timestamp so that it's scrolled into view and briefly highlighted
1. Take note of the comment ID. E.g. for [https://qa.openproject-edge.com/projects/kabirus-test-project/work\_packages/9720/activity#comment-228425](https://qa.openproject-edge.com/projects/kabirus-test-project/work_packages/9720/activity#comment-228425) the comment id is "228425"
2. Click on another comment such that the comment id changes, take note of that comment ID
4. Now, manually change the comment ID on the browser URL to the one in 3.(a)
### Steps to reproduce (alternative)
1. Login and open a work package that has comments
2. Click on three dots on a comment and select Copy link to clipboard
3. Enter the link in the browser
### What is the buggy behavior?
1. Upon clicking on comment reference/link, the reference comment is not scrolled into view and highlighted
2. The target highlight does not change whenever the comment ID is changed without reloading the whole page
### What is the expected behavior?
1. Clicking on comment reference/link should scroll the comment into view and highlight it
2. Changing the comment id in the URL (and clicking Enter) should update the target element- following browser native behavior
###