nothingislost / obsidian-workspaces-plus

Quickly switch and manage Obsidian workspaces
GNU General Public License v3.0
197 stars 6 forks source link

Open Workspaces Plus: Insider Builds 0.16.5 and 1.0.0 #86

Open michaelpporter opened 1 year ago

michaelpporter commented 1 year ago

Describe the bug Started in 0.16.5: "Open Workspaces Plus" gets a JS eror

To Reproduce Steps to reproduce the behavior:

  1. Go to install the 0.16.5 version of insider builds
  2. Click on Any method to "Open Workspaces Plus" option-esc, command pallet
  3. See nothing, unless you have Developer Tools open
Uncaught DOMException: Failed to execute 'replaceChild' on 'Node': The node to be replaced is not a child of this node.
    at new WorkspacesPlusPluginModal (plugin:workspaces-plus:2106:22)
    at WorkspacesPlus.onStatusBarClick (plugin:workspaces-plus:2445:9)
    at HTMLDivElement.eval (plugin:workspaces-plus:2433:61)
WorkspacesPlusPluginModal @ plugin:workspaces-plus:2106
onStatusBarClick @ plugin:workspaces-plus:2445
eval @ plugin:workspaces-plus:2433

Expected behavior Opening the swicher

Screenshots N/A

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

tprotopopescu commented 1 year ago

Same on 1.0

michaelpporter commented 1 year ago

Also reported as #87

etiennepellegrini commented 1 year ago

I found an easy fix, while we wait for @nothingislost to handle this properly:

I could not notice any issues with onInput handler - on the other hand, my Workspaces-Plus modal now shows up again 🎉

EDIT: to comment them out, add // in front of the line:

        // clone the input element as a hacky way to get rid of the obsidian onInput handler
        //const inputElClone = this.inputEl.cloneNode();
        //this.modalEl.replaceChild(inputElClone, this.inputEl);
        //this.inputEl = inputElClone;
tprotopopescu commented 1 year ago

Thank you! Thank you!

gavinwoo007 commented 1 year ago

It works perfectly!! thank you so much!

mmdzt commented 1 year ago

Thank you very much!!

ronrdev commented 1 year ago

Thanks for posting your solution.

jerviscui commented 1 year ago

I found an easy fix, while we wait for @nothingislost to handle this properly:

  • Navigate to <vault>/.obsidian/plugins/workspaces-plus/ and open main.js
  • find the following lines:
  • comment them out.

It's work. Very thankful.

mufftin commented 1 year ago

@etiennepellegrini Thank you so much. It works.

DTIM001 commented 1 year ago

Thanks , it works

DreamEye-nnn commented 1 year ago

Thanks for posting your solution.

jsmorabito commented 1 year ago

@aropele thank you again for posting the fix. everyone, please see #93

hopefully the plugin is working again for you all 🤞