mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1113681 - Prevent dragging search engines from the checkboxes. r=Florian
This commit is contained in:
parent
527fa74db7
commit
ceefaa5d49
@ -239,7 +239,10 @@ var gSearchPane = {
|
||||
|
||||
function onDragEngineStart(event) {
|
||||
var selectedIndex = gEngineView.selectedIndex;
|
||||
if (selectedIndex >= 0) {
|
||||
var tree = document.getElementById("engineList");
|
||||
var row = { }, col = { }, child = { };
|
||||
tree.treeBoxObject.getCellAt(event.clientX, event.clientY, row, col, child);
|
||||
if (selectedIndex >= 0 && !gEngineView.isCheckBox(row.value, col.value)) {
|
||||
event.dataTransfer.setData(ENGINE_FLAVOR, selectedIndex.toString());
|
||||
event.dataTransfer.effectAllowed = "move";
|
||||
}
|
||||
@ -408,6 +411,10 @@ EngineView.prototype = {
|
||||
return parseInt(dataTransfer.getData(ENGINE_FLAVOR));
|
||||
},
|
||||
|
||||
isCheckBox: function(index, column) {
|
||||
return column.id == "engineShown";
|
||||
},
|
||||
|
||||
// nsITreeView
|
||||
get rowCount() {
|
||||
return this._engineStore.engines.length;
|
||||
|
@ -190,7 +190,10 @@ var gSearchPane = {
|
||||
|
||||
function onDragEngineStart(event) {
|
||||
var selectedIndex = gEngineView.selectedIndex;
|
||||
if (selectedIndex >= 0) {
|
||||
var tree = document.getElementById("engineList");
|
||||
var row = { }, col = { }, child = { };
|
||||
tree.treeBoxObject.getCellAt(event.clientX, event.clientY, row, col, child);
|
||||
if (selectedIndex >= 0 && !gEngineView.isCheckBox(row.value, col.value)) {
|
||||
event.dataTransfer.setData(ENGINE_FLAVOR, selectedIndex.toString());
|
||||
event.dataTransfer.effectAllowed = "move";
|
||||
}
|
||||
@ -435,6 +438,10 @@ EngineView.prototype = {
|
||||
return parseInt(dataTransfer.getData(ENGINE_FLAVOR));
|
||||
},
|
||||
|
||||
isCheckBox: function(index, column) {
|
||||
return column.id == "engineShown";
|
||||
},
|
||||
|
||||
// nsITreeView
|
||||
get rowCount() {
|
||||
return this._engineStore.engines.length;
|
||||
|
Loading…
Reference in New Issue
Block a user