$(document).on('viewerLoaded', function() {
var annotation = null;
$(document).on('tap', function(e) {
if (annotation) {
readerControl.$annotEditPopup.find('#editNoteButton').trigger('click');
$('[data-id=' + annotation.Id + ']').find('textbox').trigger(e);
annotation = null;
}
});
var stickyNoteTool = readerControl.toolModeMap[window.PDFTron.WebViewer.ToolMode.AnnotationCreateSticky];
stickyNoteTool.on('annotationAdded', function(e, stickyAnnotation) {
annotation = stickyAnnotation;
});
});