mirror of
https://github.com/google/blockly.git
synced 2026-01-05 08:00:09 +01:00
feat: Add a blocklyNumberField CSS class to number fields (#8414)
* feat: Add a blocklyNumberField CSS class to number fields https://github.com/google/blockly/issues/8313 * feat: add 'blocklyNumberField' CSS class to FieldNumber Fixes https://github.com/google/blockly/issues/8313
This commit is contained in:
@@ -19,6 +19,7 @@ import {
|
||||
FieldInputValidator,
|
||||
} from './field_input.js';
|
||||
import * as aria from './utils/aria.js';
|
||||
import * as dom from './utils/dom.js';
|
||||
|
||||
/**
|
||||
* Class for an editable number field.
|
||||
@@ -307,6 +308,19 @@ export class FieldNumber extends FieldInput<number> {
|
||||
return htmlInput;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the field's DOM.
|
||||
*
|
||||
* @override
|
||||
*/
|
||||
|
||||
public override initView() {
|
||||
super.initView();
|
||||
if (this.fieldGroup_) {
|
||||
dom.addClass(this.fieldGroup_, 'blocklyNumberField');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a FieldNumber from a JSON arg object.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user