mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Update FieldTextInput to not edit possible read-only attributes.
The SVGRect returned from getBBox can be have its attributes as read-only.
This commit is contained in:
parent
055c11155d
commit
17be3219ee
1 changed files with 2 additions and 4 deletions
|
@ -228,10 +228,8 @@ Blockly.FieldTextInput.prototype.validate_ = function() {
|
|||
Blockly.FieldTextInput.prototype.resizeEditor_ = function() {
|
||||
var div = Blockly.WidgetDiv.DIV;
|
||||
var bBox = this.fieldGroup_.getBBox();
|
||||
bBox.width *= this.sourceBlock_.workspace.scale;
|
||||
bBox.height *= this.sourceBlock_.workspace.scale;
|
||||
div.style.width = bBox.width + 'px';
|
||||
div.style.height = bBox.height + 'px';
|
||||
div.style.width = bBox.width * this.sourceBlock_.workspace.scale + 'px';
|
||||
div.style.height = bBox.height * this.sourceBlock_.workspace.scale + 'px';
|
||||
var xy = this.getAbsoluteXY_();
|
||||
// In RTL mode block fields and LTR input fields the left edge moves,
|
||||
// whereas the right edge is fixed. Reposition the editor.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue