зеркало из https://github.com/mozilla/gecko-dev.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:
Родитель
e80a74c5d3
Коммит
a2067ddd4c
|
@ -386,7 +386,7 @@ var BookmarksMenuDNDObserver = {
|
|||
}
|
||||
if (this.isPlatformNotSupported)
|
||||
return;
|
||||
if (this.isTimerSupported)
|
||||
if (this.isTimerSupported || !aDragSession.sourceNode)
|
||||
return;
|
||||
this.onDragOverCheckTimers();
|
||||
},
|
||||
|
@ -502,6 +502,7 @@ var BookmarksMenuDNDObserver = {
|
|||
|
||||
springLoadedMenuDelay: 350, // milliseconds
|
||||
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,
|
||||
|
||||
mCurrentDragOverTarget: null,
|
||||
|
@ -595,7 +596,7 @@ var BookmarksMenuDNDObserver = {
|
|||
{
|
||||
if (this.isPlatformNotSupported)
|
||||
return;
|
||||
if (this.isTimerSupported) {
|
||||
if (this.isTimerSupported || !aDragSession.sourceNode) {
|
||||
var targetToBeLoaded = aTarget;
|
||||
clearTimeout(this.loadTimer);
|
||||
if (aTarget == aDragSession.sourceNode)
|
||||
|
@ -614,7 +615,7 @@ var BookmarksMenuDNDObserver = {
|
|||
if (this.isPlatformNotSupported)
|
||||
return;
|
||||
var This = this;
|
||||
if (this.isTimerSupported) {
|
||||
if (this.isTimerSupported || !aDragSession.sourceNode) {
|
||||
clearTimeout(this.closeTimer)
|
||||
this.closeTimer=setTimeout(function () {This.onDragCloseTarget()}, This.springLoadedMenuDelay);
|
||||
} else {
|
||||
|
@ -623,7 +624,7 @@ var BookmarksMenuDNDObserver = {
|
|||
this.closeTarget = aTarget;
|
||||
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
|
||||
// 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
|
||||
|
|
Загрузка…
Ссылка в новой задаче