Commit 56ace97c authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Fix file block config edit, select, upload buttons in Chrome (bug #819102)



For filebrowsers inside configuration forms in Chrome, the edit,
select, and file upload buttons appear to have no effect when the
copyright agreement is enabled.

In fact the javascript for these buttons *is* executed, but Chrome
won't display the resulting changes, making it rather difficult to
click on some of the buttons in forms that are opened up.

Adding a slight delay before disabling the file input fixes the issue.

Change-Id: I8cfde0056f0aefc027e3a532488be3c369292b65
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent 506c004a
......@@ -60,7 +60,10 @@ function FileBrowser(idprefix, folderid, config, globalconfig) {
this.upload_init = function () {
if ($(self.id + '_notice')) {
setNodeAttribute(self.id + '_userfile', 'disabled', true);
// If the file input is disabled immediately without this delay, later javascript changes
// to the filebrowser are not rendered by Chrome when the filebrowser is inside a block
// configuration form.
callLater(0.0001, function() { setNodeAttribute(self.id + '_userfile', 'disabled', true); });
}
if (!$(self.id + '_upload')) {
insertSiblingNodesAfter(self.id + '_uploadnumber', INPUT({
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment