!269 master 新建备忘录,点击完成,界面光标扔处于输入状态

Merge pull request !269 from zhangjintao/master
This commit is contained in:
openharmony_ci 2024-06-27 01:46:47 +00:00 committed by Gitee
commit 17ba13055b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 6 additions and 0 deletions

View File

@ -508,6 +508,10 @@ RICH_EDITOR.getFocus = function () {
return document.getElementById('editorjs_box').focus();
}
RICH_EDITOR.getBlur = function () {
return document.getElementById('editorjs_box').blur();
}
document.getElementById('editorjs_box').addEventListener('click', () => {
document.getElementById('buttonBox').style.display = 'flex';
})

View File

@ -757,6 +757,7 @@ export struct ToolBarComp {
.onClick(() => {
// 保存笔记信息到数据库
this.controllerShow.runJavaScript("getHtmlContent()")
this.controllerShow.runJavaScript("javascript:RICH_EDITOR.getBlur()")
if (this.selectedNoteData.title == "标题" && this.selectedNoteData.content_text == "") {
LogUtil.info(TAG, "note is empty,save note failed")
}

View File

@ -616,6 +616,7 @@ export struct ToolBarComp {
// 保存笔记信息到数据库
this.controllerShow.runJavaScript("getHtmlContent()")
this.editModel = false
this.controllerShow.runJavaScript("javascript:RICH_EDITOR.getBlur()")
} catch (error) {
LogUtil.info(TAG, 'tick_thin error')
}