Skip to content

Commit

Permalink
Refer to event rect instead of trying to fetch from App.queryElementRect
Browse files Browse the repository at this point in the history
Fixes #64
  • Loading branch information
terje committed Dec 24, 2023
1 parent be38c6c commit 0768fa8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { logseq as plugin } from '../package.json';
import App from './App';
import settings from './settings';

async function openTaskPanel() {
const rect = await logseq.App.queryElementRect('#' + plugin.id);
const taskPanel = document.querySelector('#' + plugin.id)!;
async function openTaskPanel(e: any) {
const { rect } = e;
const taskPanel = document.querySelector("#" + plugin.id)!;

// @ts-ignore
Object.assign(taskPanel.style, {
Expand Down

0 comments on commit 0768fa8

Please sign in to comment.