Open
Conversation
- issue: there was no way we can reach existing comment from navigator -> Comments section using keyboard only - this changes fixes this issue by moving the focus on active comment's edit button so that user can modify it via keyboard Signed-off-by: Parth Raiyani <parth.raiyani@collabora.com> Change-Id: I104e653d5b742be2a8d7b55af73cdbe0fcb03b60
Signed-off-by: Parth Raiyani <parth.raiyani@collabora.com> Change-Id: Ic748903d8c490bf302730a8d42f90bccd7533bba
issue: comment node was taking focus while navigating inside comment using tab key. - Adding tabindex=-1 prevents moving focus via tab Signed-off-by: Parth Raiyani <parth.raiyani@collabora.com> Change-Id: Ia7bd9c927e5a3849f643b3b3a5aa07451e72dc7e
caolanm
reviewed
Mar 19, 2026
| private editOnKeyPress (e: any): void { | ||
| if (e.code === 'Space' || e.code === 'Enter') | ||
| this.onEditComment(e); | ||
| window.L.DomEvent.stopPropagation(e); |
Contributor
There was a problem hiding this comment.
do we want to stop propagation for all key presses, or just the space/enter ones?
| var commentSection = app.sectionContainer?.getSectionWithName( | ||
| app.CSections.CommentList.name, | ||
| ) as cool.CommentSection; | ||
| if (commentSection) commentSection.pendingNavigatorFocus = true; |
Contributor
There was a problem hiding this comment.
So if a comment list section exists, which presumably is true if there are any comments, then if any treeview entry is activated this flag is set. So the comment section pendingNavigatorFocus would get set to true even if a non-comment is activated?
What's the callstack when the navigator triggered comment activation happens? Is it via the select method of CommentListSection.ts ? Could we put it in that select or something like that in response to (presumably core) telling us that the comment is to be activated rather than trying to predict what will happen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes:
Checklist
make prettier-writeand formatted the code.make checkmake runand manually verified that everything looks okay