fix(editor): hide floating toolbar when switching notes#401
Merged
deepin-bot[bot] merged 1 commit intoJul 8, 2026
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR ensures the rich text editor’s floating toolbar (Summernote air popover) is always hidden and fully reset when switching notes or hiding the popover, preventing residual open dropdown states for font and font size. Sequence diagram for hiding editor air popover when switching notessequenceDiagram
actor User
participant WebRichTextEditor
participant JsContent
participant AirPopover
User->>WebRichTextEditor: setData(data, reg)
WebRichTextEditor->>JsContent: callJsHideEditToolbar()
JsContent->>AirPopover: hide()
AirPopover-->>JsContent: popover hidden
JsContent-->>WebRichTextEditor: toolbar hidden
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Note
详情{
"assets/web/js/summernote_v9_2.js": [
{
"line": " var KEY_BOGUS = 'bogus';",
"line_number": 3943,
"rule": "S106",
"reason": "Var naming | 6d7db7168d"
},
{
"line": " .attr('src', 'https://instagram.com/p/' + igMatch[1] + '/embed/')",
"line_number": 6957,
"rule": "S35",
"reason": "Url link | dcb31e9ddf"
},
{
"line": " .attr('src', 'http://v.qq.com/iframe/player.html?vid=' + vid + '&auto=0');",
"line_number": 6994,
"rule": "S35",
"reason": "Url link | ce631f8419"
}
]
} |
Hide the editor floating toolbar unconditionally when note data changes. 切换笔记内容时无条件隐藏编辑区悬浮工具栏。 Also clear font and font-size dropdown open states when hiding air popover. 隐藏气泡工具栏时同步清理字体和字号下拉展开状态。 Log: 修复切换笔记后字体气泡工具栏残留 Bug: https://pms.uniontech.com/bug-view-365817.html Influence: 修复展开字体下拉栏后切换笔记时悬浮气泡工具栏未消失的问题。
Resurgamz
force-pushed
the
feature/fix-BUG365817
branch
from
July 8, 2026 06:37
ed2a560 to
071bbc5
Compare
|
Note
详情{
"assets/web/js/summernote_v9_2.js": [
{
"line": " var KEY_BOGUS = 'bogus';",
"line_number": 3943,
"rule": "S106",
"reason": "Var naming | 6d7db7168d"
},
{
"line": " .attr('src', 'https://instagram.com/p/' + igMatch[1] + '/embed/')",
"line_number": 6957,
"rule": "S35",
"reason": "Url link | dcb31e9ddf"
},
{
"line": " .attr('src', 'http://v.qq.com/iframe/player.html?vid=' + vid + '&auto=0');",
"line_number": 6994,
"rule": "S35",
"reason": "Url link | ce631f8419"
}
]
} |
deepin pr auto review★ 总体评分:100分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 diff --git a/src/views/webrichtexteditor.cpp b/src/views/webrichtexteditor.cpp
index f113d651..cea9c5aa 100644
--- a/src/views/webrichtexteditor.cpp
+++ b/src/views/webrichtexteditor.cpp
@@ -741,10 +741,8 @@ void WebRichTextEditor::onLoadFinsh()
void WebRichTextEditor::setData(VNoteItem *data, const QString ®)
{
- //有焦点先隐藏编辑工具栏
- if (hasFocus()) {
- emit JsContent::instance()->callJsHideEditToolbar();
- }
+ //切换笔记时隐藏编辑工具栏,避免下拉状态残留
+ emit JsContent::instance()->callJsHideEditToolbar();
if (nullptr == data) {
this->setVisible(false); |
max-lvs
approved these changes
Jul 8, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: max-lvs, Resurgamz The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Author
|
/forcemerge |
Contributor
|
This pr force merged! (status: unstable) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(editor): hide floating toolbar when switching notes
Hide the editor floating toolbar unconditionally when note data changes.
切换笔记内容时无条件隐藏编辑区悬浮工具栏。
Also clear font and font-size dropdown open states when hiding air popover
隐藏气泡工具栏时同步清理字体和字号下拉展开状态。
Log:修复切换笔记后字体气泡工具栏残留
Bug: https://pms.uniontech.com/bug-view-365817.html
Influence:修复展开字体下拉栏后切换笔记时悬浮气泡工具栏未消失的问题。