fix(settings): let a library be renamed by clicking its name
The name's click bubbled to config-page's own document handler, which exists to close the rename editor - so it opened and closed the editor in the same click and the field never appeared. The overflow menu's Rename was unaffected because it stops propagation, which is why the feature looked like it worked. Found while closing Phase 3 and left for the phase that reworks this file. The e2e guard opens the editor and abandons it rather than committing a rename: the specs share one backend process, and a renamed library fails the ones that assert on fixture content.
This commit is contained in:
@@ -2096,7 +2096,13 @@ export class ConfigPage extends ViewLifecycleMixin(LitElement) {
|
||||
: html`
|
||||
<span
|
||||
class="library-name"
|
||||
@click=${() => this.handleStartRename(lib.id, lib.name)}
|
||||
@click=${(e: Event) => {
|
||||
// The document handler closes the
|
||||
// editor, and without this it closes
|
||||
// the one this very click opened.
|
||||
e.stopPropagation();
|
||||
this.handleStartRename(lib.id, lib.name);
|
||||
}}
|
||||
>
|
||||
${lib.name}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user