diff --git a/CHANGELOG.md b/CHANGELOG.md index 738c0d4bc..6d8cb849d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ Web UI version numbers should always match the corresponding version of LBRY App * Fixed rendering of small prices (#461) * Fixed incorrect URI in Downloads/Published page (#460) * Fixed backward / forward logic of history (#499) + * Fixed menu bug (#503) ### Deprecated * diff --git a/ui/js/component/fileList/view.jsx b/ui/js/component/fileList/view.jsx index c92dae016..57d4d991f 100644 --- a/ui/js/component/fileList/view.jsx +++ b/ui/js/component/fileList/view.jsx @@ -51,6 +51,14 @@ class FileList extends React.PureComponent { }; } + getChannelSignature(fileInfo) { + if (fileInfo.value) { + return fileInfo.value.publisherSignature.certificateId; + } else { + return fileInfo.metadata.publisherSignature.certificateId; + } + } + handleSortChanged(event) { this.setState({ sortBy: event.target.value, @@ -68,8 +76,7 @@ class FileList extends React.PureComponent { if (fileInfo.channel_name) { uriParams.channelName = fileInfo.channel_name; uriParams.contentName = fileInfo.name; - // The following can be done as certificateID of a claim is nothing but the claimID of the channel. - uriParams.claimId = fileInfo.value.publisherSignature.certificateId; + uriParams.claimId = this.getChannelSignature(fileInfo); } else { uriParams.claimId = fileInfo.claim_id; uriParams.name = fileInfo.name; diff --git a/ui/js/component/menu.js b/ui/js/component/menu.js index 2344aac5b..cb0fcdfe9 100644 --- a/ui/js/component/menu.js +++ b/ui/js/component/menu.js @@ -69,7 +69,8 @@ export class DropDownMenu extends React.PureComponent { }); } - handleWindowClick(e) { + /*this will force "this" to always be the class, even when passed to an event listener*/ + handleWindowClick = e => { if ( this.state.menuOpen && (!this._menuDiv || !this._menuDiv.contains(e.target)) @@ -78,7 +79,7 @@ export class DropDownMenu extends React.PureComponent { menuOpen: false, }); } - } + }; render() { if (!this.state.menuOpen && this._isWindowClickBound) {