зеркало из https://github.com/mozilla/pjs.git
Bug 232795 In <bookmarksMenu.js>, "Error: aDragSession.sourceNode has no properties" (Av2b-XPFE) <bookmarksMenu.js> p=Serge GAUTHERIE <gautheri@noos.fr>,r=neil,sr=jag
This commit is contained in:
Родитель
2d64766621
Коммит
93d8a14d30
|
@ -386,7 +386,7 @@ var BookmarksMenuDNDObserver = {
|
||||||
}
|
}
|
||||||
if (this.isPlatformNotSupported)
|
if (this.isPlatformNotSupported)
|
||||||
return;
|
return;
|
||||||
if (this.isTimerSupported)
|
if (this.isTimerSupported || !aDragSession.sourceNode)
|
||||||
return;
|
return;
|
||||||
this.onDragOverCheckTimers();
|
this.onDragOverCheckTimers();
|
||||||
},
|
},
|
||||||
|
@ -502,6 +502,7 @@ var BookmarksMenuDNDObserver = {
|
||||||
|
|
||||||
springLoadedMenuDelay: 350, // milliseconds
|
springLoadedMenuDelay: 350, // milliseconds
|
||||||
isPlatformNotSupported: navigator.platform.indexOf("Mac") != -1, // see bug 136524
|
isPlatformNotSupported: navigator.platform.indexOf("Mac") != -1, // see bug 136524
|
||||||
|
// Needs to be dynamically overridden (to |true|) in the case of an external drag: see bug 232795.
|
||||||
isTimerSupported: navigator.platform.indexOf("Win") == -1,
|
isTimerSupported: navigator.platform.indexOf("Win") == -1,
|
||||||
|
|
||||||
mCurrentDragOverTarget: null,
|
mCurrentDragOverTarget: null,
|
||||||
|
@ -595,7 +596,7 @@ var BookmarksMenuDNDObserver = {
|
||||||
{
|
{
|
||||||
if (this.isPlatformNotSupported)
|
if (this.isPlatformNotSupported)
|
||||||
return;
|
return;
|
||||||
if (this.isTimerSupported) {
|
if (this.isTimerSupported || !aDragSession.sourceNode) {
|
||||||
var targetToBeLoaded = aTarget;
|
var targetToBeLoaded = aTarget;
|
||||||
clearTimeout(this.loadTimer);
|
clearTimeout(this.loadTimer);
|
||||||
if (aTarget == aDragSession.sourceNode)
|
if (aTarget == aDragSession.sourceNode)
|
||||||
|
@ -614,7 +615,7 @@ var BookmarksMenuDNDObserver = {
|
||||||
if (this.isPlatformNotSupported)
|
if (this.isPlatformNotSupported)
|
||||||
return;
|
return;
|
||||||
var This = this;
|
var This = this;
|
||||||
if (this.isTimerSupported) {
|
if (this.isTimerSupported || !aDragSession.sourceNode) {
|
||||||
clearTimeout(this.closeTimer)
|
clearTimeout(this.closeTimer)
|
||||||
this.closeTimer=setTimeout(function () {This.onDragCloseTarget()}, This.springLoadedMenuDelay);
|
this.closeTimer=setTimeout(function () {This.onDragCloseTarget()}, This.springLoadedMenuDelay);
|
||||||
} else {
|
} else {
|
||||||
|
@ -623,7 +624,7 @@ var BookmarksMenuDNDObserver = {
|
||||||
this.closeTarget = aTarget;
|
this.closeTarget = aTarget;
|
||||||
this.loadTimer = null;
|
this.loadTimer = null;
|
||||||
|
|
||||||
// If user isn't rearranging within the menu, close it
|
// If the user isn't rearranging within the menu, close it
|
||||||
// To do so, we exploit a Mac bug: timeout set during
|
// To do so, we exploit a Mac bug: timeout set during
|
||||||
// drag and drop on Windows and Mac are fired only after that the drop is released.
|
// drag and drop on Windows and Mac are fired only after that the drop is released.
|
||||||
// timeouts will pile up, we may have a better approach but for the moment, this one
|
// timeouts will pile up, we may have a better approach but for the moment, this one
|
||||||
|
|
Загрузка…
Ссылка в новой задаче