mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1682602 - remove pinning and drag/drop support for sponsored top sites. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D106309
This commit is contained in:
parent
8e0285b790
commit
d5277e99fa
@ -51,10 +51,14 @@ export class TopSiteLink extends React.PureComponent {
|
||||
}
|
||||
break;
|
||||
case "dragstart":
|
||||
event.target.blur();
|
||||
if (this.props.link.sponsored_position) {
|
||||
event.preventDefault();
|
||||
break;
|
||||
}
|
||||
this.dragged = true;
|
||||
event.dataTransfer.effectAllowed = "move";
|
||||
event.dataTransfer.setData("text/topsite-index", this.props.index);
|
||||
event.target.blur();
|
||||
this.props.onDragEvent(
|
||||
event,
|
||||
this.props.index,
|
||||
|
@ -23,8 +23,6 @@ export const TOP_SITES_SPOC_CONTEXT_MENU_OPTIONS = [
|
||||
"ShowPrivacyInfo",
|
||||
];
|
||||
export const TOP_SITES_SPONSORED_POSITION_CONTEXT_MENU_OPTIONS = [
|
||||
"PinTopSite",
|
||||
"Separator",
|
||||
"OpenInNewWindow",
|
||||
"OpenInPrivateWindow",
|
||||
"Separator",
|
||||
|
@ -8737,7 +8737,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
const TOP_SITES_SOURCE = "TOP_SITES";
|
||||
const TOP_SITES_CONTEXT_MENU_OPTIONS = ["CheckPinTopSite", "EditTopSite", "Separator", "OpenInNewWindow", "OpenInPrivateWindow", "Separator", "BlockUrl", "DeleteUrl"];
|
||||
const TOP_SITES_SPOC_CONTEXT_MENU_OPTIONS = ["PinTopSite", "Separator", "OpenInNewWindow", "OpenInPrivateWindow", "Separator", "BlockUrl", "ShowPrivacyInfo"];
|
||||
const TOP_SITES_SPONSORED_POSITION_CONTEXT_MENU_OPTIONS = ["PinTopSite", "Separator", "OpenInNewWindow", "OpenInPrivateWindow", "Separator", "BlockUrl", "AboutSponsored"]; // the special top site for search shortcut experiment can only have the option to unpin (which removes) the topsite
|
||||
const TOP_SITES_SPONSORED_POSITION_CONTEXT_MENU_OPTIONS = ["OpenInNewWindow", "OpenInPrivateWindow", "Separator", "BlockUrl", "AboutSponsored"]; // the special top site for search shortcut experiment can only have the option to unpin (which removes) the topsite
|
||||
|
||||
const TOP_SITES_SEARCH_SHORTCUTS_CONTEXT_MENU_OPTIONS = ["CheckPinTopSite", "Separator", "BlockUrl"]; // minimum size necessary to show a rich icon instead of a screenshot
|
||||
|
||||
@ -9003,10 +9003,16 @@ class TopSiteLink extends react__WEBPACK_IMPORTED_MODULE_4___default.a.PureCompo
|
||||
break;
|
||||
|
||||
case "dragstart":
|
||||
event.target.blur();
|
||||
|
||||
if (this.props.link.sponsored_position) {
|
||||
event.preventDefault();
|
||||
break;
|
||||
}
|
||||
|
||||
this.dragged = true;
|
||||
event.dataTransfer.effectAllowed = "move";
|
||||
event.dataTransfer.setData("text/topsite-index", this.props.index);
|
||||
event.target.blur();
|
||||
this.props.onDragEvent(event, this.props.index, this.props.link, this.props.title);
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user