diff --git a/chrome/content/zotero/contextPane.js b/chrome/content/zotero/contextPane.js index bd79277df0..7a3c87127a 100644 --- a/chrome/content/zotero/contextPane.js +++ b/chrome/content/zotero/contextPane.js @@ -279,9 +279,14 @@ var ZoteroContextPane = new function () { if (splitter.getAttribute('state') != 'collapsed') { if (_panesDeck.selectedIndex == 1) { - var node = _notesPaneDeck.selectedPanel; - if (node.selectedIndex == 1) { - return node.querySelector('zoteronoteeditor'); + var libraryContext = _notesPaneDeck.selectedPanel; + // Global note + if (libraryContext.selectedIndex == 1) { + return libraryContext.querySelector('zoteronoteeditor'); + } + // Tab specific child note + else if (libraryContext.selectedIndex == 2) { + return libraryContext.querySelector('.zotero-context-pane-tab-notes-deck').selectedPanel.querySelector('zoteronoteeditor'); } } }