mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-23 13:56:44 +00:00
Merge "templateFoldingExtension: hide tooltip when typing"
This commit is contained in:
commit
5e6047bd4c
|
@ -34,6 +34,10 @@
|
||||||
cursor: @cursor-base--hover;
|
cursor: @cursor-base--hover;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
padding: 0 1px;
|
padding: 0 1px;
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
.cm-tooltip-fold:hover {
|
||||||
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cm-editor .cm-foldPlaceholder {
|
.cm-editor .cm-foldPlaceholder {
|
||||||
|
|
|
@ -320,7 +320,10 @@ const templateFoldingExtension = [
|
||||||
StateField.define( {
|
StateField.define( {
|
||||||
create,
|
create,
|
||||||
update( tooltip, { state, docChanged, selection } ) {
|
update( tooltip, { state, docChanged, selection } ) {
|
||||||
return docChanged || selection ? create( state ) : tooltip;
|
if ( docChanged ) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return selection ? create( state ) : tooltip;
|
||||||
},
|
},
|
||||||
provide( f ) {
|
provide( f ) {
|
||||||
return showTooltip.from( f );
|
return showTooltip.from( f );
|
||||||
|
|
Loading…
Reference in a new issue