diff --git a/resources/codemirror.less b/resources/codemirror.less index c8ea3da5..bd20b318 100644 --- a/resources/codemirror.less +++ b/resources/codemirror.less @@ -55,6 +55,10 @@ cursor: @cursor-base--hover; line-height: 1.2; padding: 0 1px; + opacity: 0.6; +} +.cm-tooltip-fold:hover { + opacity: 1; } .cm-editor .cm-foldPlaceholder { diff --git a/resources/codemirror.mediawiki.templateFolding.js b/resources/codemirror.mediawiki.templateFolding.js index bcdee46b..d3ecafe2 100644 --- a/resources/codemirror.mediawiki.templateFolding.js +++ b/resources/codemirror.mediawiki.templateFolding.js @@ -320,7 +320,10 @@ const templateFoldingExtension = [ StateField.define( { create, update( tooltip, { state, docChanged, selection } ) { - return docChanged || selection ? create( state ) : tooltip; + if ( docChanged ) { + return null; + } + return selection ? create( state ) : tooltip; }, provide( f ) { return showTooltip.from( f );