fix lookup-widget position in scrolling page (#979)
This commit is contained in:
@@ -51,7 +51,16 @@ export const LookupWidget = () => {
|
||||
.closest("[data-source-id]")
|
||||
?.getAttribute("data-source-id");
|
||||
|
||||
setSelected({ word, context, position, sourceType, sourceId });
|
||||
setSelected({
|
||||
word,
|
||||
context,
|
||||
position: {
|
||||
x: position.x,
|
||||
y: position.y + window.scrollY + 10,
|
||||
},
|
||||
sourceType,
|
||||
sourceId,
|
||||
});
|
||||
setOpen(true);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user