mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-23 13:56:44 +00:00
templateFoldingExtension: hide tooltip when typing
Temporary solution to T367256 before a folding gutter is applied. Hide the folding tooltip when typing, and make the tooltip semi-transparent until hovered. Bug: T367256 Change-Id: I3ee3de737aa36692d094a54e0eea94d6f5690767
This commit is contained in:
parent
7efeb2ff11
commit
081f0a17af
|
@ -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 {
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue