Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 7df2952

Browse files
committed
refactor($location): remove obsolete workaround for Firefox bug
The bug was fixed in Firefox 48: https://bugzilla.mozilla.org/show_bug.cgi?id=684208, and only affected the scenario runner
1 parent 167766a commit 7df2952

File tree

2 files changed

+1
-22
lines changed

2 files changed

+1
-22
lines changed

src/ng/location.js

-2
Original file line numberDiff line numberDiff line change
@@ -938,8 +938,6 @@ function $LocationProvider() {
938938
// update location manually
939939
if ($location.absUrl() !== $browser.url()) {
940940
$rootScope.$apply();
941-
// hack to work around FF6 bug 684208 when scenario runner clicks on links
942-
$window.angular['ff-684208-preventDefault'] = true;
943941
}
944942
}
945943
}

src/ngMock/browserTrigger.js

+1-20
Original file line numberDiff line numberDiff line change
@@ -147,30 +147,11 @@
147147

148148
if (!evnt) return;
149149

150-
var originalPreventDefault = evnt.preventDefault,
151-
appWindow = element.ownerDocument.defaultView,
152-
fakeProcessDefault = true,
153-
finalProcessDefault,
154-
angular = appWindow.angular || {};
155-
156-
// igor: temporary fix for https://bugzilla.mozilla.org/show_bug.cgi?id=684208
157-
angular['ff-684208-preventDefault'] = false;
158-
evnt.preventDefault = function() {
159-
fakeProcessDefault = false;
160-
return originalPreventDefault.apply(evnt, arguments);
161-
};
162-
163150
if (!eventData.bubbles || supportsEventBubblingInDetachedTree() || isAttachedToDocument(element)) {
164-
element.dispatchEvent(evnt);
151+
return element.dispatchEvent(evnt);
165152
} else {
166153
triggerForPath(element, evnt);
167154
}
168-
169-
finalProcessDefault = !(angular['ff-684208-preventDefault'] || !fakeProcessDefault);
170-
171-
delete angular['ff-684208-preventDefault'];
172-
173-
return finalProcessDefault;
174155
};
175156

176157
function supportsTouchEvents() {

0 commit comments

Comments
 (0)