1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-31 11:23:40 +00:00

Fix broken Cancel and Rename buttons on RenameDialog. (#2577)

Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
Viacheslav Chimishuk 2022-02-07 03:51:27 +02:00 committed by GitHub
parent a8818148e2
commit f9d068d7a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,6 +26,8 @@ export class RenameDialog extends EventTarget {
this.torrents = torrents;
this.elements = RenameDialog._create();
this.elements.dismiss.addEventListener('click', () => this._onDismiss());
this.elements.confirm.addEventListener('click', () => this._onConfirm());
this.elements.entry.value = torrents[0].getName();
document.body.append(this.elements.root);
@ -65,8 +67,6 @@ export class RenameDialog extends EventTarget {
elements.root.setAttribute('aria-label', 'Rename Torrent');
elements.heading.textContent = 'Enter new name:';
elements.confirm.textContent = 'Rename';
elements.dismiss.addEventListener('click', () => this._onDismiss());
elements.confirm.addEventListener('click', () => this._onConfirm());
const label = document.createElement('label');
label.setAttribute('for', 'torrent-rename-name');