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
2 changes: 1 addition & 1 deletion src/fields/field_note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export class FieldNote extends Blockly.FieldTextInput {
* Show a field with piano keys.
*/
showEditor_(event: PointerEvent, quietInput = false) {
super.showEditor_(event, quietInput);
super.showEditor_(event, quietInput, false);

// Build the SVG DOM.
const div = Blockly.DropDownDiv.getContentDiv();
Expand Down
10 changes: 9 additions & 1 deletion src/fields/scratch_field_angle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,15 @@ class ScratchFieldAngle extends Blockly.FieldNumber {
* Show the inline free-text editor on top of the text.
*/
showEditor_(event: PointerEvent) {
super.showEditor_(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_(event, noFocus, false);

// If there is an existing drop-down someone else owns, hide it immediately and clear it.
Blockly.DropDownDiv.hideWithoutAnimation();
Blockly.DropDownDiv.clearContent();
Expand Down