Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Workspaces Plus: Insider Builds 0.16.5 and 1.0.0 #86

Open
michaelpporter opened this issue Oct 7, 2022 · 12 comments
Open

Open Workspaces Plus: Insider Builds 0.16.5 and 1.0.0 #86

michaelpporter opened this issue Oct 7, 2022 · 12 comments

Comments

@michaelpporter
Copy link

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):

  • OS: macOS Monterey
  • Browser Obsidian 0.16.5
  • Version 12.6.1

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

@tprotopopescu
Copy link

Same on 1.0

@michaelpporter
Copy link
Author

Also reported as #87

@michaelpporter michaelpporter changed the title Open Workspaces Plus: Insider Builds 0.16.5 Open Workspaces Plus: Insider Builds 0.16.5 and 1.0.0 Oct 17, 2022
@etiennepellegrini
Copy link

etiennepellegrini commented Oct 25, 2022

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:
        // 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;
  • comment them out.
  • If using the beta version, the offensive lines appear twice! Comment them out twice!

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
Copy link

Thank you! Thank you!

@gavinwoo007
Copy link

It works perfectly!! thank you so much!

@mmdzt
Copy link

mmdzt commented Oct 27, 2022

Thank you very much!!

@ronrdev
Copy link

ronrdev commented Oct 29, 2022

Thanks for posting your solution.

@jerviscui
Copy link

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
Copy link

mufftin commented Oct 30, 2022

@etiennepellegrini Thank you so much. It works.

@DTIM001
Copy link

DTIM001 commented Nov 4, 2022

Thanks , it works

@DreamEye-nnn
Copy link

Thanks for posting your solution.

@jsmorabito
Copy link
Collaborator

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

hopefully the plugin is working again for you all 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests