Update TopPanel.js

master
JFH 2021-05-15 00:51:22 +02:00
parent d7b8ac5846
commit d73e5cad5b
1 changed files with 2 additions and 2 deletions

View File

@ -553,10 +553,10 @@ class TopPanel {
attrChanger(e) { attrChanger(e) {
const attr = e.target.getAttribute("data-attr"); const attr = e.target.getAttribute("data-attr");
let val = e.target.value; let val = e.target.value;
const valid = isValidUnit(attr, val, this.editor.selectedElement); const valid = isValidUnit(attr, val, this.selectedElement);
if (!valid) { if (!valid) {
e.target.value = this.editor.selectedElement().getAttribute(attr); e.target.value = this.selectedElement.getAttribute(attr);
// eslint-disable-next-line no-alert // eslint-disable-next-line no-alert
alert(this.i18next.t('notification.invalidAttrValGiven')); alert(this.i18next.t('notification.invalidAttrValGiven'));
return false; return false;