Skip to content

Commit

Permalink
Merge pull request #150 from stevengharris/editorBackground
Browse files Browse the repository at this point in the history
Use systemBackground for MarkupWKWebView, turn autocorrect off.
  • Loading branch information
stevengharris authored Oct 6, 2023
2 parents c62befa + e465517 commit c037bc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions MarkupEditor/MarkupWKWebView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ public class MarkupWKWebView: WKWebView, ObservableObject {
/// which in turn loads the css and js scripts itself. The markup.html defines the "editor" element, which
/// is later populated with html.
private func initForEditing() {
isOpaque = false // Eliminate flash in dark mode
backgroundColor = .clear // Eliminate flash in dark mode
isOpaque = false // Eliminate flash in dark mode
backgroundColor = .systemBackground // Eliminate flash in dark mode
initRootFiles()
markupDelegate?.markupSetup(self)
// Enable drop interaction
Expand Down
2 changes: 1 addition & 1 deletion MarkupEditor/Resources/markup.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</head>

<body>
<div id="editor" contentEditable="true" spellcheck="false"></div>
<div id="editor" contenteditable="true" spellcheck="false" autocorrect="off"></div>
<script src="markup.js"></script>
</body>
</html>

0 comments on commit c037bc9

Please sign in to comment.