diff --git a/core/modules/widgets/browse.js b/core/modules/widgets/browse.js index ddb39d628..ed57e4c33 100644 --- a/core/modules/widgets/browse.js +++ b/core/modules/widgets/browse.js @@ -46,10 +46,13 @@ BrowseWidget.prototype.render = function(parent,nextSibling) { if(this.nwsaveas) { domNode.setAttribute("nwsaveas",this.nwsaveas); } - // Nw.js supports "webkitdirectory" to allow a directory to be selected + // Nw.js supports "webkitdirectory" and "nwdirectory" to allow a directory to be selected if(this.webkitdirectory) { domNode.setAttribute("webkitdirectory",this.webkitdirectory); } + if(this.nwdirectory) { + domNode.setAttribute("nwdirectory",this.nwdirectory); + } // Add a click event handler domNode.addEventListener("change",function (event) { if(self.message) { @@ -81,6 +84,7 @@ BrowseWidget.prototype.execute = function() { this.tooltip = this.getAttribute("tooltip"); this.nwsaveas = this.getAttribute("nwsaveas"); this.webkitdirectory = this.getAttribute("webkitdirectory"); + this.nwdirectory = this.getAttribute("nwdirectory"); }; /*