mirror of
https://github.com/google/blockly.git
synced 2025-12-15 13:50:08 +01:00
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.
This commit is contained in:
@@ -208,8 +208,14 @@ export class RenderedWorkspaceComment
|
||||
private startGesture(e: PointerEvent) {
|
||||
const gesture = this.workspace.getGesture(e);
|
||||
if (gesture) {
|
||||
gesture.handleCommentStart(e, this);
|
||||
this.workspace.getLayerManager()?.append(this, layers.BLOCK);
|
||||
if (browserEvents.isTargetInput(e)) {
|
||||
// If the text area was the focus, don't allow this event to bubble up
|
||||
// and steal focus away from the editor/comment.
|
||||
e.stopPropagation();
|
||||
} else {
|
||||
gesture.handleCommentStart(e, this);
|
||||
this.workspace.getLayerManager()?.append(this, layers.BLOCK);
|
||||
}
|
||||
common.setSelected(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user