Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix link node not detected if child has styling

ammarahm-edbbf15c1a125b
diff --git a/apps/mobile/html/Web.bundle/site/init.js b/apps/mobile/html/Web.bundle/site/init.js
index 92ee132cd..a4c7687d9 100755
--- a/apps/mobile/html/Web.bundle/site/init.js
+++ b/apps/mobile/html/Web.bundle/site/init.js
@@ -723,9 +723,14 @@ function selectchange() {
currentFormats.fontsize = '8pt';
}
}
+
if (node.nodeName === 'A') {
currentFormats.link = node.getAttribute('href');
}
+ let isLinkNode = node.closest('a');
+ if (isLinkNode) {
+ currentFormats.link = isLinkNode.getAttribute('href');
+ }
currentFormats.fontname = editor.selection.getNode().style.fontFamily;