Dialog initially without scrollbar
Posted: Wed Feb 03, 2021 7:18 pm
Hi,
I have a dialog that contains a lot of content so it should have a scrollbar. But initially there is no scrollbar. When I resize the dialog (explicitly or by resizing the browser window) the scrollbar appears. Also when I perform the action again (the dialog is a member).
Hier is the code of my minimized sample:
My workaround is to make the dialog resizable so the user can reszie it and let the scrollbar appear. But I'd prefer the scroll bar to be thare right at the beginning. Any suggestions how to achieve that?
Thanks and regards,
Patrik
I have a dialog that contains a lot of content so it should have a scrollbar. But initially there is no scrollbar. When I resize the dialog (explicitly or by resizing the browser window) the scrollbar appears. Also when I perform the action again (the dialog is a member).
Hier is the code of my minimized sample:
Code: Select all
DialogTestAction = function (editor) {
sync.actions.AbstractAction.call(this, '');
this.editor = editor;
this.dialog = workspace.createDialog();
};
DialogTestAction.prototype = Object.create(sync.actions.AbstractAction.prototype);
DialogTestAction.prototype.constructor = DialogTestAction;
DialogTestAction.prototype.getDisplayName = function () {
return 'Dialog-Test';
};
DialogTestAction.prototype.actionPerformed = function (callback) {
this.dialog.setTitle('Ergebnis');
this.dialog.getElement().innerHTML = '<p style="min-width: 200px">';
for (i = 0; i < 30; i++) {
this.dialog.getElement().innerHTML += 'Test Test Test<br/>';
}
this.dialog.getElement().innerHTML += '</p>';
this.dialog.show();
this.dialog.focus();
};
Thanks and regards,
Patrik