obsidian-projects
obsidian-projects copied to clipboard
On mobile (Android), cannot open a note from the Board view
What happened?
The note is not opened, got black (presumably webview) screen instead:
What did you expect to happen?
The note should be opened. Just like when clicking on it from the Table view (which works fine).
How can we reproduce it (as minimally and precisely as possible)?
- have a project with notes
- take an Android phone
- open Board view
- click on any note title (the underlined
href
)
Anything else we need to know?
I'm not a JS programmer, but wanted a quick fix for myself. So by directly editing compiled main.js
, found the following solution:
...
+// main.js, line 37503 as of 1.17.1 release
function instance21($$self, $$props, $$invalidate) {
+ let $app; // copied from event handler used in the Table view
+ component_subscribe($$self, app2, ($$value) => $$invalidate(6, $app = $$value)); // copied from event handler used in the Table view
let { $$slots: slots = {}, $$scope } = $$props;
let { linkText } = $$props;
let { sourcePath } = $$props;
let { tooltip = "" } = $$props;
let { resolved } = $$props;
const dispatch2 = createEventDispatcher();
let aria = {};
if (tooltip) {
aria = {
"aria-label": tooltip,
"aria-label-position": "top"
};
}
- const click_handler2 = (event) => {
- event.stopPropagation();
- dispatch2("open", {
- linkText,
- sourcePath,
- newLeaf: event.ctrlKey || event.metaKey
- });
- };
+const targetEl = event.target;
+ const closestAnchor = targetEl.tagName === "A" ? targetEl : targetEl.closest("a");
+ if (!closestAnchor) {
+ return;
+ }
+ if (closestAnchor.hasClass("internal-link")) {
+ event.preventDefault();
+ const href = closestAnchor.getAttr("href");
+ const newLeaf = event.button === 1 || event.ctrlKey || event.metaKey;
+ if (href) {
+ $app.workspace.openLinkText(href, sourcePath, newLeaf);
+ }
+ }
...
Plugin version
1.17.1
Obsidian version
1.4.16 (114)
OS
Other
I'm running in the same issue. Commenting to track any progress..
Bump. Obsidian 1.5.12 (134). Projects 1.17.3. Error page when clickig note on board, calendar views. But table view is correct