Bug 609619 - "[Regression] Switching between browser control panes in intervals of 1/2 a second results in previous pane being shown" [r=mark.finkle]

This commit is contained in:
Vivien Nicolas 2010-11-08 08:03:00 -05:00
Родитель cdea8e53d0
Коммит 2189e66d19
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -258,7 +258,7 @@ MouseModule.prototype = {
this._target = null;
// Do pan
if (dragData.isPan()) {
if (dragData.isPan() && this._dragger) {
// User was panning around, do not allow click
let generatesClick = aEvent.detail;
if (generatesClick)
@ -550,9 +550,9 @@ var ScrollUtils = {
* ui.dragThresholdX
*/
isPan: function isPan(aPoint, aPoint2) {
let distanceSquared = (Math.pow(aPoint.x - aPoint2.x, 2) +
Math.pow(aPoint.y - aPoint2.y, 2));
return distanceSquared > Math.pow(this.tapRadius, 2);
if (Math.abs(aPoint.x - aPoint2.x) > this.tapRadius ||
Math.abs(aPoint.y - aPoint2.y) > this.tapRadius)
return true;
},
/**