mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Keep text-input widget div options to CSS class
This commit is contained in:
parent
8af37d7f53
commit
382a1f4f82
2 changed files with 7 additions and 0 deletions
|
@ -143,6 +143,9 @@ Blockly.Css.CONTENT = [
|
|||
'display: none;',
|
||||
'position: absolute;',
|
||||
'z-index: 999;',
|
||||
'}',
|
||||
|
||||
'.blocklyWidgetDiv.fieldTextInput {',
|
||||
'overflow: hidden;',
|
||||
'border: 1px solid;',
|
||||
'box-sizing: border-box;',
|
||||
|
|
|
@ -127,6 +127,8 @@ Blockly.FieldTextInput.prototype.showEditor_ = function(opt_quietInput) {
|
|||
|
||||
Blockly.WidgetDiv.show(this, this.sourceBlock_.RTL, this.widgetDispose_());
|
||||
var div = Blockly.WidgetDiv.DIV;
|
||||
// Apply text-input-specific fixed CSS
|
||||
div.className += ' fieldTextInput';
|
||||
// Create the input.
|
||||
var htmlInput = goog.dom.createDom('input', 'blocklyHtmlInput');
|
||||
htmlInput.setAttribute('spellcheck', this.spellcheck_);
|
||||
|
@ -317,6 +319,8 @@ Blockly.FieldTextInput.prototype.widgetDispose_ = function() {
|
|||
style.width = 'auto';
|
||||
style.height = 'auto';
|
||||
style.fontSize = '';
|
||||
// Reset class
|
||||
Blockly.WidgetDiv.DIV.className = 'blocklyWidgetDiv';
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue