mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 04:09:50 +00:00
Bug 1584988 - Only allow files to be dropped onto HAR overlay r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D48982 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
037581be8e
commit
d920e3e85f
@ -51,6 +51,10 @@ class DropHarHandler extends Component {
|
||||
|
||||
onDragEnter(event) {
|
||||
event.preventDefault();
|
||||
if (event.dataTransfer.files.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
startDragging(findDOMNode(this));
|
||||
}
|
||||
|
||||
|
@ -232,6 +232,13 @@ define(function(require, exports, module) {
|
||||
}
|
||||
}
|
||||
|
||||
onMouseDown(event) {
|
||||
// Prevents click-dragging the tab headers
|
||||
if (event) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
// API
|
||||
|
||||
setActive(index) {
|
||||
@ -322,6 +329,7 @@ define(function(require, exports, module) {
|
||||
"aria-selected": isTabSelected,
|
||||
role: "tab",
|
||||
onClick: this.onClickTab.bind(this, index),
|
||||
onMouseDown: this.onMouseDown.bind(this),
|
||||
},
|
||||
title,
|
||||
badge && !isTabSelected && showBadge()
|
||||
|
Loading…
x
Reference in New Issue
Block a user