From a12f6b322f6321fda3166e760878f8f40ddb1aaf Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 16 Apr 2019 17:24:09 +0200 Subject: [PATCH] Fix the title input being reset with userlist changes --- www/common/sframe-common-title.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/www/common/sframe-common-title.js b/www/common/sframe-common-title.js index b406a5dd0..3e98b853e 100644 --- a/www/common/sframe-common-title.js +++ b/www/common/sframe-common-title.js @@ -51,14 +51,16 @@ define([ metadataMgr.onChange(function () { var md = metadataMgr.getMetadata(); if ($title) { - $title.find('span.cp-toolbar-title-value').text(md.title || md.defaultTitle); - $title.find('input').val(md.title || md.defaultTitle); $title.find('input').prop('placeholder', md.defaultTitle); } exp.defaultTitle = md.defaultTitle; - exp.title = md.title; }); metadataMgr.onTitleChange(function (title, defaultTitle) { + if ($title) { + $title.find('span.cp-toolbar-title-value').text(title || defaultTitle); + $title.find('input').val(title || defaultTitle); + } + exp.title = title; sframeChan.query('Q_SET_PAD_TITLE_IN_DRIVE', { title: title, defaultTitle: defaultTitle