Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion plugins/field-angle/src/field_angle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,13 @@ export class FieldAngle extends Blockly.FieldNumber {
// eslint-disable-next-line @typescript-eslint/naming-convention
protected override showEditor_(e?: Event) {
// Mobile browsers have issues with in-line textareas (focus & keyboards).
// Also, don't let the parent take ephemeral focus since the drop-down div
// below will handle it, instead.
const noFocus =
Blockly.utils.userAgent.MOBILE ||
Blockly.utils.userAgent.ANDROID ||
Blockly.utils.userAgent.IPAD;
super.showEditor_(e, noFocus);
super.showEditor_(e, noFocus, false);

const editor = this.dropdownCreate();
Blockly.DropDownDiv.getContentDiv().appendChild(editor);
Expand Down
5 changes: 3 additions & 2 deletions plugins/field-slider/src/field_slider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ export class FieldSlider extends Blockly.FieldNumber {
protected showEditor_(e?: Event, quietInput?: boolean) {
// Always quiet the input for the super constructor, as we don't want to
// focus on the text field, and we don't want to display the modal
// editor on mobile devices.
super.showEditor_(e, true);
// editor on mobile devices. Also, don't let the parent take ephemeral focus
// since the drop-down div below will handle it, instead.
super.showEditor_(e, true, false);

// Build the DOM.
const editor = this.dropdownCreate_();
Expand Down
Loading