Steps to reproduce
- Open the Obsidian sample plugin.
- Modify it to include a custom view. Also add some way to open said custom view.
- Inside the onOpen() function of your custom view, add the following code (example is in javascript):
onOpen() {
new DropdownComponent(this.containerEl);
new SliderComponent(this.containerEl);
new ToggleComponent(this.containerEl);
}
npm run build
- Add your custom plugin to your .obsidian/plugins folder.
- Run obsidian, enable your custom plugin, and open your custom view.
- Observe how the created components are siblings of the this.containerEl, rather than children.
Expected result
The components should be children of the passed containerEl.
Actual result
The elements were siblings. Here is some example html, only including a dropdown:
Log.zip (1.6 KB)
Environment
- Operating system: Ubuntu 18.04
- Obsidian version: 0.9.15