Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue 1368: fix select logic when context menu had opened #1421

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "JDN",
"description": "JDN – helps Test Automation Engineer to create Page Objects in the test automation framework and speed up test development",
"devtools_page": "index.html",
"version": "3.13.540",
"version": "3.13.541",
"icons": {
"128": "icon128.png"
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jdn-ai-chrome-extension",
"version": "3.13.540",
"version": "3.13.541",
"description": "jdn-ai chrome extension",
"scripts": {
"start": "webpack --watch --env devenv",
Expand Down
2 changes: 1 addition & 1 deletion src/pageServices/contentScripts/contextmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const runContextMenu = () => {
this.reload = function () {
if (document.getElementById("jdn_cm_" + num) == null) {
const cnt = document.createElement("div");
cnt.className = "cm_container";
cnt.className = "cm_container context-menu";
cnt.id = "jdn_cm_" + num;

document.body.appendChild(cnt);
Expand Down
3 changes: 3 additions & 0 deletions src/pageServices/contentScripts/selectable.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ export const selectable = () => {
const labelTarget = e.target.closest(".jdn-label");
if (labelTarget) return;

const menuTarget = e.target.closest(".context-menu");
if (menuTarget) return;

self.options.start && self.options.start(e);
if (self.options.key && !e[self.options.key]) return;
self.options.onDeselect && self.selectedItems.size && self.options.onDeselect(Array.from(self.selectedItems));
Expand Down
Loading