TF-3627 Fix two scrollbar with different look

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-04-16 16:06:40 +07:00
committed by Dat H. Pham
parent 3c4129f6c8
commit b8b4557fd7
4 changed files with 37 additions and 4 deletions
+31
View File
@@ -218,4 +218,35 @@ class HtmlTemplate {
''';
static const String markDownAndASCIIArtStyleCSS = 'display: block; font-family: monospace; white-space: pre; margin: 1em 0px;';
static const String customInternalStyleCSS = '''
<style>
* {
overflow: auto;
}
*::-webkit-scrollbar {
width: 8px;
height: 8px;
}
*::-webkit-scrollbar-thumb {
background-color: #c1c1c1;
border-radius: 10px;
min-height: 70px;
}
*::-webkit-scrollbar-track {
background: transparent;
border-radius: 10px;
}
/* Browsers without `::-webkit-scrollbar-*` support */
@supports not selector(::-webkit-scrollbar) {
* {
scrollbar-color: #c1c1c1 transparent;
}
}
</style>
''';
}
@@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:collection/collection.dart';
import 'package:core/utils/app_logger.dart';
import 'package:core/utils/html/html_template.dart';
import 'package:core/utils/html/html_utils.dart';
import 'package:flutter/material.dart';
import 'package:html_editor_enhanced/html_editor.dart';
@@ -118,6 +119,7 @@ class _WebEditorState extends State<WebEditorWidget> {
darkMode: false,
initialText: widget.content,
customBodyCssStyle: HtmlUtils.customCssStyleHtmlEditor(direction: widget.direction),
customInternalCSS: HtmlTemplate.customInternalStyleCSS,
spellCheck: true,
disableDragAndDrop: true,
webInitialScripts: UnmodifiableListView([
+3 -3
View File
@@ -1235,11 +1235,11 @@ packages:
dependency: "direct main"
description:
path: "."
ref: main
resolved-ref: "0ba81a166219f227aec70d562ab06daedf793608"
ref: custom-internal-css
resolved-ref: "7ba66dc9cee4e6c202be93ee6afa8a0f3a4c0415"
url: "https://github.com/linagora/html-editor-enhanced.git"
source: git
version: "3.1.5"
version: "3.1.6"
http:
dependency: transitive
description:
+1 -1
View File
@@ -60,7 +60,7 @@ dependencies:
html_editor_enhanced:
git:
url: https://github.com/linagora/html-editor-enhanced.git
ref: main
ref: custom-internal-css
jmap_dart_client:
git: