Skip to content

[Bug] Multiple duplicate entries in the right-click menu #1414

@animusastralis

Description

@animusastralis

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest Zotero and the latest plugin?

  • I have confirmed I'm using the latest Zotero and the latest plugin

Environment

  • OS: Windows 11 24H2
  • Zotero Version: 7.0.16
  • Plugin Version: 2.5.1

Describe the bug

I'm experiencing multiple duplicate entries in the note area right-click menu:

Image

Each consecutive right click adds one additional line.

Debug Output

Debug output:

<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<meta charset="UTF-8">
		<link rel="stylesheet" href="Debug%20Output_files/zotero.css">
		<title>Debug Output</title>
		<script src="Debug%20Output_files/include.js"></script>
		<script src="Debug%20Output_files/debugViewer.js"></script>
		
		<style>
			body {
				margin: 0;
				background: var(--material-background);
			}
			
			a {
				text-decoration: underline;
			}
			
			header {
				position: fixed;
				top: 0;
				color: var(--fill-primary);
				background: var(--material-sidepane);
				display: flex;
				align-items: center;
				width: calc(100% - 20px);
				height: 18px;
				padding: 10px;
				margin-bottom: 10px;
				font-family: sans-serif;
				font-size: 11pt;
			}
			
			header > * {
				margin-right: 10px;
			}
			
			progress {
				width: 125px;
			}
			
			#debug-id {
				font-weight: 600;
			}
			
			#submit-result {
				line-height: 1.25em;
			}
			
			#submit-result-copy-id {
				cursor: pointer;
				padding-left: 2px;
			}
			
			#submit-error {
				font-weight: 600;
				color: var(--accent-red);
			}
			
			#content {
				margin-top: 38px;
				padding: 10px 9px;
				font-family: Monaco, Consolas, Inconsolata, monospace;
				font-size: 8pt;
			}
			
			#errors {
				padding-bottom: 12px;
				border-bottom: var(--material-panedivider);
				white-space: pre-wrap;
			}
			
			
			
			/*
			   CSS tooltip, adapted from http://stackoverflow.com/a/25836471
			*/
			[data-tooltip] {
				display: inline-block;
				position: relative;
				cursor: pointer;
				padding: 2px;
			}
			[data-tooltip]:before {
				content: attr(data-tooltip);
				display: none;
				position: absolute;
				background: var(--color-menu-opaque);
				color: var(--fill-primary);
				padding: 4px 8px;
				font-size: 12px;
				font-family: sans-serif;
				line-height: 1.4;
				text-align: center;
				border-radius: 4px;
				
				left: 50%;
				transform: translateX(-50%);
				
				top: 100%;
				margin-top: 6px;
				
				white-space: nowrap;
			}
			[data-tooltip]:after {
				content: '';
				display: none;
				position: absolute;
				width: 0;
				height: 0;
				border-color: transparent;
				border-style: solid;
				
				left: 50%;
				margin-left: -6px;
				
				top: 100%;
				border-width: 0 6px 6px;
				border-bottom-color: var(--color-menu-opaque);
			}
			/* Show the tooltip when hovering */
			[data-tooltip]:hover:before,
			[data-tooltip]:hover:after {
				display: block;
				z-index: 50;
			}
		</style>
	</head>
	<body>
		<header>
			<button id="submit-button" onclick="submit(this)">Submit…</button>
			<button id="clear-button" onclick="clearOutput(this)">Clear</button>
			<progress id="submit-progress" hidden=""></progress>
			<p id="submit-result" hidden="">
				Submitted with Debug ID <span id="debug-id"></span>
				<span id="submit-result-copy-id" onclick="copyIDToClipboard(this)">📋</span>
			</p>
			<p id="submit-error" hidden=""></p>
		</header>
		<div id="content">
			<div id="errors">[JavaScript Error: "uncaught exception: undefined"]

[JavaScript Error: "Passing a URI to Zotero.File.getContentsAsync() is deprecated -- use Zotero.HTTP.request() instead"]

[JavaScript Error: "Passing a URI to Zotero.File.getContentsAsync() is deprecated -- use Zotero.HTTP.request() instead"]

[JavaScript Error: "Passing a URI to Zotero.File.getContentsAsync() is deprecated -- use Zotero.HTTP.request() instead"]

[JavaScript Error: "Passing a URI to Zotero.File.getContentsAsync() is deprecated -- use Zotero.HTTP.request() instead"]

[JavaScript Error: "Passing a URI to Zotero.File.getContentsAsync() is deprecated -- use Zotero.HTTP.request() instead"]

[JavaScript Error: "Passing a URI to Zotero.File.getContentsAsync() is deprecated -- use Zotero.HTTP.request() instead"]

[JavaScript Error: "Passing a URI to Zotero.File.getContentsAsync() is deprecated -- use Zotero.HTTP.request() instead"]

[JavaScript Error: "Passing a URI to Zotero.File.getContentsAsync() is deprecated -- use Zotero.HTTP.request() instead"]

[JavaScript Error: "Passing a URI to Zotero.File.getContentsAsync() is deprecated -- use Zotero.HTTP.request() instead"]

[JavaScript Error: "Passing a URI to Zotero.File.getContentsAsync() is deprecated -- use Zotero.HTTP.request() instead"]

[JavaScript Error: "Passing a URI to Zotero.File.getContentsAsync() is deprecated -- use Zotero.HTTP.request() instead"]

[JavaScript Error: "Passing a URI to Zotero.File.getContentsAsync() is deprecated -- use Zotero.HTTP.request() instead"]

appName =&gt; Zotero, version =&gt; 7.0.16 (x64), os =&gt; Windows 11 26100, locale =&gt; en-GB, extensions =&gt; Better Notes for Zotero (2.5.1, extension), Add-on Market for Zotero (2.1.1, extension, disabled), Actions and Tags for Zotero (2.1.1, extension, disabled), Google Scholar Citation Count (4.3.0, extension, disabled), Linter for Zotero (1.24.5, extension, disabled), Better BibTex for Zotero (7.0.36, extension, disabled)</div>
			<div id="output"><p>(4)(+0104258): Beginning DB transaction 3L0MFuvx</p><p>(3)(+0000001): Reloading tags box</p><p>(3)(+0000010):
 Getting contents of 
jar:file:///C:/Users/Daniel/AppData/Roaming/Zotero/Zotero/Profiles/sxeynajr.default/extensions/[email protected]!/chrome/content/scripts/editorScript.js</p><p>(1)(+0000000): Passing a URI to Zotero.File.getContentsAsync() is deprecated -- use Zotero.HTTP.request() instead</p><p>(3)(+0000000):
 HTTP GET 
jar:file:///C:/Users/Daniel/AppData/Roaming/Zotero/Zotero/Profiles/sxeynajr.default/extensions/[email protected]!/chrome/content/scripts/editorScript.js</p><p>(4)(+0000125): Committed DB transaction 3L0MFuvx</p><p>(3)(+0000059):
 HTTP GET 
jar:file:///C:/Users/User/AppData/Roaming/Zotero/Zotero/Profiles/sxeynajr.default/extensions/[email protected]!/chrome/content/scripts/editorScript.js
 succeeded with 200</p><p>(3)(+0000001): Getting contents of 
jar:file:///C:/Users/User/AppData/Roaming/Zotero/Zotero/Profiles/sxeynajr.default/extensions/[email protected]!/chrome/content/styles/editor.css</p><p>(1)(+0000000): Passing a URI to Zotero.File.getContentsAsync() is deprecated -- use Zotero.HTTP.request() instead</p><p>(3)(+0000000):
 HTTP GET 
jar:file:///C:/Users/User/AppData/Roaming/Zotero/Zotero/Profiles/sxeynajr.default/extensions/[email protected]!/chrome/content/styles/editor.css</p><p>(3)(+0000001):
 HTTP GET 
jar:file:///C:/Users/User/AppData/Roaming/Zotero/Zotero/Profiles/sxeynajr.default/extensions/[email protected]!/chrome/content/styles/editor.css
 succeeded with 200</p><p>(3)(+0000001): [Better Notes for Zotero]
[Warning] Creating element style with no namespace specified. Found multiply namespace matches.</p><p>(3)(+0000105): [Better Notes for Zotero]
[Warning] Creating element button with no namespace specified. Found multiply namespace matches.</p><p>(3)(+0000002): [Better Notes for Zotero]
{}</p><p>(3)(+0000280): [Better Notes for Zotero]
{}</p><p>(3)(+0022488): itemTree.render(). Displaying Item Tree</p></div>
		</div>
	

</body></html>

Anything else?

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingstale

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions