* remove alert after prompt execution, and fix placeholder keeps showing even with content injected, bug #36913.

This commit is contained in:
liwenrui
2023-07-31 09:26:11 +08:00
parent fb11850dc3
commit 1dc96fa408
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -456,7 +456,7 @@ class ai extends control
if($prompt->status == 'draft') $_SESSION['auditPrompt']['time'] = time();
return $this->send(array('result' => 'success', 'message' => $this->lang->ai->execute->success, 'locate' => $location));
return $this->send(array('result' => 'success', 'locate' => $location));
}
/**
+6
View File
@@ -53,6 +53,12 @@
});
if(editorInstance)
{
if(data === null) data = '';
/* Remove placeholder. */
if(data !== '') editorInstance.$placeholder.each(function(_idx, ph) {ph.style.display = 'none';});
/* Set editor content and sync with textarea. */
editorInstance.html(data);
editorInstance.sync();
break;