EINDEX / logseq-copilot

Logseq Copilot is a Browser extension that allows you to access your Logseq via your browser.
https://logseq-copilot.eindex.me
GNU General Public License v3.0
235 stars 21 forks source link

Cannot show query result. #28

Closed leeyaunlong closed 1 year ago

leeyaunlong commented 1 year ago

Chrome:102, copilot : 1.11.3 Save is work, icon will show correct saved item counts. But click the icon, cannot show query result.

snap_20230508_160438_chrome

I checked service work log: snap_20230508_155733_chrome

EINDEX commented 1 year ago

Do you mind sharing block content here?

leeyaunlong commented 1 year ago

since update to 1.11.3, the copilot will show some random issue.

leeyaunlong commented 1 year ago

Do you mind sharing block content here? The url schema jump to logseq function work well at v1.11.0 Since v1.11.1 , thejump function failed.

leeyaunlong commented 1 year ago

Do you mind sharing block content here? If I right click the "to block" or "note" , select open in new tab , the copilot will trigger the logseq open correct location.

I guess the link added some custom event , cause the issue.

Final I find out the popup source :

        document.querySelectorAll('a').forEach((e) => {
          e.onclick = () => {
            connect.postMessage({
              type: 'open-page',
              url: e.href,
            });
            window.close();
          };

If I remove the click event at those type link , will work well.

pstuifzand commented 1 year ago

I was just looking at this and saw that the 'open-page' message was logged by this line, instead of the other message handler. Perhaps this helps with debugging the problem further?

EINDEX commented 1 year ago

Thanks for your information, which help me fix this issue!

The fix version on v1.11.4 will release on the store soon.