diff --git a/devtools/client/inspector/inspector.js b/devtools/client/inspector/inspector.js index 3bdcf96d0c12..182006a9b190 100644 --- a/devtools/client/inspector/inspector.js +++ b/devtools/client/inspector/inspector.js @@ -1283,14 +1283,6 @@ Inspector.prototype = { disabled: !isEditableElement, click: () => this.onAddAttribute(), })); - attributesSubmenu.append(new MenuItem({ - id: "node-menu-copy-attribute", - label: INSPECTOR_L10N.getFormatStr("inspectorCopyAttributeValue.label", - isAttributeClicked ? `"${nodeInfo.value}"` : ""), - accesskey: INSPECTOR_L10N.getStr("inspectorCopyAttributeValue.accesskey"), - disabled: !isAttributeClicked, - click: () => this.onCopyAttributeValue(), - })); attributesSubmenu.append(new MenuItem({ id: "node-menu-edit-attribute", label: INSPECTOR_L10N.getFormatStr("inspectorEditAttribute.label", @@ -1299,6 +1291,7 @@ Inspector.prototype = { disabled: !isAttributeClicked, click: () => this.onEditAttribute(), })); + attributesSubmenu.append(new MenuItem({ id: "node-menu-remove-attribute", label: INSPECTOR_L10N.getFormatStr("inspectorRemoveAttribute.label", @@ -1824,14 +1817,6 @@ Inspector.prototype = { container.addAttribute(); }, - /** - * Copy attribute value for node. - * Used for node context menu and shouldn't be called directly. - */ - onCopyAttributeValue: function () { - clipboardHelper.copyString(this.nodeMenuTriggerInfo.value); - }, - /** * Edit attribute for node. * Used for node context menu and shouldn't be called directly. diff --git a/devtools/client/inspector/test/browser_inspector_menu-01-sensitivity.js b/devtools/client/inspector/test/browser_inspector_menu-01-sensitivity.js index 99b5061a7ade..052e9da68c94 100644 --- a/devtools/client/inspector/test/browser_inspector_menu-01-sensitivity.js +++ b/devtools/client/inspector/test/browser_inspector_menu-01-sensitivity.js @@ -35,7 +35,6 @@ const ALL_MENU_ITEMS = [ "node-menu-scrollnodeintoview", "node-menu-screenshotnode", "node-menu-add-attribute", - "node-menu-copy-attribute", "node-menu-edit-attribute", "node-menu-remove-attribute" ].concat(PASTE_MENU_ITEMS, ACTIVE_ON_DOCTYPE_ITEMS); diff --git a/devtools/client/inspector/test/browser_inspector_menu-02-copy-items.js b/devtools/client/inspector/test/browser_inspector_menu-02-copy-items.js index aa9ea90559ed..57a5dbaa08e7 100644 --- a/devtools/client/inspector/test/browser_inspector_menu-02-copy-items.js +++ b/devtools/client/inspector/test/browser_inspector_menu-02-copy-items.js @@ -38,12 +38,6 @@ const COPY_ITEMS_TEST_DATA = [ text: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABC" + "AAAAAA6fptVAAAACklEQVQYV2P4DwABAQEAWk1v8QAAAABJRU5ErkJggg==", }, - { - desc: "copy attribute value", - id: "node-menu-copy-attribute", - selector: "[data-id=\"copy\"]", - text: "

Paragraph for testing copy

", - }, ]; add_task(function* () { diff --git a/devtools/client/locales/en-US/inspector.properties b/devtools/client/locales/en-US/inspector.properties index affa42b1686a..3298d820afec 100644 --- a/devtools/client/locales/en-US/inspector.properties +++ b/devtools/client/locales/en-US/inspector.properties @@ -117,13 +117,6 @@ inspectorEditAttribute.accesskey=E inspectorRemoveAttribute.label=Remove Attribute %S inspectorRemoveAttribute.accesskey=R -# LOCALIZATION NOTE (inspectorCopyAttributeValue.label): This is the label of a -# sub-menu "Attribute" in the inspector contextual-menu that appears -# when the user right-clicks on the attribute of a node in the inspector, -# and that allows to copy the attribute value to the clipboard. -inspectorCopyAttributeValue.label=Copy Attribute Value %S -inspectorCopyAttributeValue.accesskey=V - # LOCALIZATION NOTE (inspector.nodePreview.selectNodeLabel): # This string is displayed in a tooltip that is shown when hovering over a DOM # node preview (e.g. something like "div#foo.bar").