Skip to content

Commit 7e44e81

Browse files
authored
fix: Fix bug that prevented editing workspace comments on Firefox. (#8779)
* fix: Fix bug that prevented editing workspace comments on Firefox. * chore: Add a docstring for getTextArea(). * refactor: Use isTargetInput() instead of comparing to comment textarea.
1 parent 29950fd commit 7e44e81

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

core/comments/rendered_workspace_comment.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,14 @@ export class RenderedWorkspaceComment
208208
private startGesture(e: PointerEvent) {
209209
const gesture = this.workspace.getGesture(e);
210210
if (gesture) {
211-
gesture.handleCommentStart(e, this);
212-
this.workspace.getLayerManager()?.append(this, layers.BLOCK);
211+
if (browserEvents.isTargetInput(e)) {
212+
// If the text area was the focus, don't allow this event to bubble up
213+
// and steal focus away from the editor/comment.
214+
e.stopPropagation();
215+
} else {
216+
gesture.handleCommentStart(e, this);
217+
this.workspace.getLayerManager()?.append(this, layers.BLOCK);
218+
}
213219
common.setSelected(this);
214220
}
215221
}

0 commit comments

Comments
 (0)