author | Edouard Oger <eoger@fastmail.com> |
Tue, 10 Oct 2017 16:46:09 -0400 | |
changeset 385953 | 4730ce3175f8ce3f10c40af5e21c6831668187a8 |
parent 385952 | 2ad9ea63f3cc4413097e3fa2ab978b25836954f1 |
child 385954 | 5ede138b6e27cfd84d87e65e039623a5dc683121 |
push id | 32672 |
push user | archaeopteryx@coole-files.de |
push date | Fri, 13 Oct 2017 09:00:05 +0000 |
treeherder | mozilla-central@3efcb26e5f37 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | jaws |
bugs | 1406051 |
milestone | 58.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/browser/base/content/browser-sync.js +++ b/browser/base/content/browser-sync.js @@ -460,19 +460,22 @@ var gSync = { // showSendLink and showSendPage are mutually exclusive const showSendLink = contextMenu.onSaveableLink || contextMenu.onPlainTextLink; const showSendPage = !showSendLink && !(contextMenu.isContentSelected || contextMenu.onImage || contextMenu.onCanvas || contextMenu.onVideo || contextMenu.onAudio || contextMenu.onLink || contextMenu.onTextInput); - ["context-sendpagetodevice", "context-sep-sendpagetodevice"] + // Avoids double separator on images with links. + const hideSeparator = contextMenu.isContentSelected && + contextMenu.onLink && contextMenu.onImage; + ["context-sendpagetodevice", ...(hideSeparator ? [] : ["context-sep-sendpagetodevice"])] .forEach(id => contextMenu.showItem(id, showSendPage)); - ["context-sendlinktodevice", "context-sep-sendlinktodevice"] + ["context-sendlinktodevice", ...(hideSeparator ? [] : ["context-sep-sendlinktodevice"])] .forEach(id => contextMenu.showItem(id, showSendLink)); if (!showSendLink && !showSendPage) { return; } const targetURI = showSendLink ? contextMenu.linkURL : contextMenu.browser.currentURI.spec;