Skip to content

Commit

Permalink
fix: first popup fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lumixraku committed Dec 14, 2024
1 parent c43ae84 commit b81a1f8
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,13 @@ export class PromptController extends Disposable {
private _initSelectionsEndListener() {
const d = new DisposableCollection();

this.disposeWithMe(this._refSelectionsService.selectionMoveEnd$.subscribe((selections) => {
// response events from selection control, when selection control is created
// this is so weird !!!

this.disposeWithMe(merge(this._refSelectionsService.selectionSet$, this._refSelectionsService.selectionMoveEnd$).subscribe((selections) => {
d.dispose();

if (selections.length === 0) return;
if (!selections || selections.length === 0) return;
// Theme color should be set when SelectionControl is created, it's too late to set theme color at selection End(pointerup).
// The logic below has been moved to syncToEditor.
// this._allSelectionRenderServices.forEach((r) => this._updateRefSelectionStyle(r, this._isSelectionMovingRefSelections));
Expand Down

0 comments on commit b81a1f8

Please sign in to comment.