From 14aa53e0fac9eb7868fe6adebecc62467c88b179 Mon Sep 17 00:00:00 2001 From: zgtm Date: Mon, 26 Feb 2018 19:44:01 +0100 Subject: [PATCH] Move ordinal in block 'text_getSubstring' (#1656) On updating the block 'text_getSubstring', the ordinal string 'ORDINAL1' is moved when the corresponding corresponding input field is moved so that the ordinal string does not end up at the end of the block. --- blocks/text.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/blocks/text.js b/blocks/text.js index 5054b66bf..af5a1f18e 100644 --- a/blocks/text.js +++ b/blocks/text.js @@ -313,6 +313,9 @@ Blockly.Blocks['text_getSubstring'] = { .appendField(menu, 'WHERE' + n); if (n == 1) { this.moveInputBefore('AT1', 'AT2'); + if (this.getInput('ORDINAL1')) { + this.moveInputBefore('ORDINAL1', 'AT2'); + } } } };