mirror of
https://github.com/google/blockly.git
synced 2026-01-04 15:40: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) {
|
private startGesture(e: PointerEvent) {
|
||||||
const gesture = this.workspace.getGesture(e);
|
const gesture = this.workspace.getGesture(e);
|
||||||
if (gesture) {
|
if (gesture) {
|
||||||
gesture.handleCommentStart(e, this);
|
if (browserEvents.isTargetInput(e)) {
|
||||||
this.workspace.getLayerManager()?.append(this, layers.BLOCK);
|
// 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);
|
common.setSelected(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user