mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Fix some more validation bugs
- Fix error if widget did not have a feedback slot or a '#help-text' element - Fix copy/paste error scrolling to wrong widget
This commit is contained in:
parent
5a8f7c3c70
commit
4454f350b2
@ -444,11 +444,16 @@ const Et2InputWidgetMixin = <T extends Constructor<LitElement>>(superclass : T)
|
||||
{
|
||||
feedback.slot = "feedback";
|
||||
}
|
||||
else
|
||||
else if(<HTMLElement>this.shadowRoot.querySelector("#help-text"))
|
||||
{
|
||||
// Not always visible?
|
||||
(<HTMLElement>this.shadowRoot.querySelector("#help-text")).style.display = "initial";
|
||||
}
|
||||
else
|
||||
{
|
||||
// No place to show the validation error. That's a widget problem, but we'll show it as message
|
||||
this.egw().message(feedback.textContent, "error");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1100,9 +1100,9 @@ export class etemplate2
|
||||
(<Et2Tabs><unknown>tmpWidget).activateTab(invalid_widgets[0]);
|
||||
}
|
||||
// scroll the widget into view
|
||||
if(typeof widget.scrollIntoView === 'function')
|
||||
if(typeof tmpWidget.scrollIntoView === 'function')
|
||||
{
|
||||
widget.scrollIntoView();
|
||||
tmpWidget.scrollIntoView();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user