mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
fix: adding and removing css classes that contained spaces (#6455)
* fix: adding CSS classes * fix: removing css classes * fix: add a test for multiple icon classes * chore: format
This commit is contained in:
@@ -239,9 +239,9 @@ export class FieldMultilineInput extends FieldTextInput {
|
||||
if (this.isBeingEdited_) {
|
||||
const htmlInput = this.htmlInput_ as HTMLElement;
|
||||
if (this.isOverflowedY_) {
|
||||
htmlInput.classList.add('blocklyHtmlTextAreaInputOverflowedY');
|
||||
dom.addClass(htmlInput, 'blocklyHtmlTextAreaInputOverflowedY');
|
||||
} else {
|
||||
htmlInput.classList.remove('blocklyHtmlTextAreaInputOverflowedY');
|
||||
dom.removeClass(htmlInput, 'blocklyHtmlTextAreaInputOverflowedY');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,10 +258,10 @@ export class FieldMultilineInput extends FieldTextInput {
|
||||
}
|
||||
const htmlInput = this.htmlInput_ as HTMLElement;
|
||||
if (!this.isTextValid_) {
|
||||
htmlInput.classList.add('blocklyInvalidInput');
|
||||
dom.addClass(htmlInput, 'blocklyInvalidInput');
|
||||
aria.setState(htmlInput, aria.State.INVALID, true);
|
||||
} else {
|
||||
htmlInput.classList.remove('blocklyInvalidInput');
|
||||
dom.removeClass(htmlInput, 'blocklyInvalidInput');
|
||||
aria.setState(htmlInput, aria.State.INVALID, false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user