@@ -8,7 +8,7 @@ import type {
88 StrippedLocation ,
99} from "@/lib/enhancer"
1010import { logger } from "@/lib/logger"
11- import { modifyDOM } from "../modifyDOM "
11+ import { fixupOvertype , modifyDOM } from "../overtype-misc "
1212import { commonGitHubOptions , prepareGitHubHighlighter } from "./github-common"
1313
1414const GH_PR_APPEND = "GH_PR_APPEND" as const
@@ -69,18 +69,14 @@ export class GitHubPrAppendEnhancer
6969 ) : OverTypeInstance {
7070 prepareGitHubHighlighter ( )
7171 const overtypeContainer = modifyDOM ( textArea )
72- const overtype = new OverType ( overtypeContainer , {
73- ...commonGitHubOptions ,
74- minHeight : "102px" ,
75- padding : "var(--base-size-8)" ,
76- placeholder : "Add your comment here..." ,
77- } ) [ 0 ] !
78- const listenForEmpty = new MutationObserver ( ( ) => {
79- if ( textArea . value === "" ) {
80- overtype . updatePreview ( )
81- }
82- } )
83- listenForEmpty . observe ( textArea , { attributes : true , characterData : true } )
72+ const overtype = fixupOvertype (
73+ new OverType ( overtypeContainer , {
74+ ...commonGitHubOptions ,
75+ minHeight : "102px" ,
76+ padding : "var(--base-size-8)" ,
77+ placeholder : "Add your comment here..." ,
78+ } )
79+ )
8480 return overtype
8581 }
8682
0 commit comments