Change:
model.presentation.textEdit.range.endColumn ); const trackedRange = editor.getModel()!._setTrackedRange(null, newRange, TrackedRangeStickiness.GrowsOnlyWhenTypingAfter); <del> editor.pushUndoStop(); editor.executeEdits('colorpicker', textEdits); </del> newRange = editor.getModel()!._getTrackedRange(trackedRange) || newRange; } else { <del> textEdits = [{ range, text: model.presentation.label, forceMoveMarkers: false }]; </del> <ins> textEdits.push({ range, text: model.presentation.label, forceMoveMarkers: false }); </ins> newRange = range.setEndPosition(range.endLineNumber, range.startColumn + model.presentation.label.length); <del> editor.pushUndoStop(); editor.executeEdits('colorpicker', textEdits); </del> } if (model.presentation.additionalTextEdits) { <del> textEdits = [...model.presentation.additionalTextEdits]; editor.executeEdits('colorpicker', textEdits); if (context) { context.hide(); } </del> <ins> textEdits.push(...model.presentation.additionalTextEdits); </ins> } <ins> editor.executeEdits('colorpicker', textEdits); </ins> editor.pushUndoStop(); return newRange; }

Discussion:
When a provides multiple ColorPresentations, they can be cycled by clicking on the text in the color picker because dragging the color selector around does not close the color picker: ! However, if the contains , the color picker closes immediately upon clicking anywhere, making it impossible to select any other presentation. Clicking where you'd normally cycle through the presentations also immediately closes the picker. ! Here's an example. Paste this into a newly created VS Code extension, change to and then open a file with at least a few lines.
I have this same problem, its super annoying. ! Whenever I put my mouse on the tiny color box, the color palette opens and when I hover the mouse to select a color, the entire color palette disappears. I need to keep on repeating the above steps until the color palette does not close anymore. Whats the fix to this issue? How can I use a color picker from an extension plugin? Thanks.
Can confirm in vscode insiders it has been fixed
Thanks for picking up on it this issue will be closed
This doesn't seem fixed in Insiders to me. Using the same code provided in my OP above. If anything, it seems to close more aggressively (sometimes just clicking on the colour block toggles it open and closed very quickly):
I see, apologies, I will reopen the issue
So frustrating, I have the same issue with my vs code.
Same here. Started closing on click about a month ago.
same here it is very annoyng. has any1 found a way to fix it<
Facing the same issue
Got the same problem
thanks! what's the release milestone for the fix?
Hey this fix will go into Insiders soon, and then it will land in stable only end of January, which is when our next stable release is.
the colour picker stays open now, but it's not updating the range correctly, it's just inserting on every click. Let me know if I should file a new issue about this (it's not really the same bug, but I suspect it might occur as a result of this fix): I'm using the same code I posted above to repro.
Hi thank you for posting about this and apologies, it looks like the fix has caused a regression. Yes if you could please open an issue that would be great.
I've opened