mirror of
https://github.com/kotaindah55/extended-markdown-syntax.git
synced 2026-07-22 05:38:06 +00:00
fix: color menu not showing when the cursor was placed in the end of line
This commit is contained in:
parent
6b3e92aa04
commit
3c27c28167
1 changed files with 4 additions and 1 deletions
|
|
@ -63,7 +63,10 @@ export class ColorMenu extends Menu {
|
|||
read: (view) => {
|
||||
let app = view.state.facet(appFacet.reader),
|
||||
canvasNodeCoords = getActiveCanvasNodeCoords(app),
|
||||
charCoords = view.coordsForChar(this.tagRange.from);
|
||||
charCoords = view.coordsForChar((offset ?? this.tagRange.from));
|
||||
if (offset !== undefined && !charCoords) {
|
||||
charCoords = view.coordsForChar(offset - 1);
|
||||
}
|
||||
return { charCoords, canvasNodeCoords };
|
||||
},
|
||||
write: (measure) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue