diff options
| author | Misko Hevery | 2010-07-23 11:38:52 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-07-23 11:38:52 -0700 |
| commit | 748e91ba92af4a85de3579be504914092381c7e1 (patch) | |
| tree | feb454e8d7d09fc6432e326b23a65482e18995ca /src | |
| parent | 8015e09e383bcd3ebf85d44cd68c67dd85db5771 (diff) | |
| download | angular.js-748e91ba92af4a85de3579be504914092381c7e1.tar.bz2 | |
fixed some of the IE bugs
Diffstat (limited to 'src')
| -rw-r--r-- | src/Browser.js | 1 | ||||
| -rw-r--r-- | src/services.js | 10 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/Browser.js b/src/Browser.js index 2777dcda..3299540c 100644 --- a/src/Browser.js +++ b/src/Browser.js @@ -22,7 +22,6 @@ function Browser(location, document, head) { this.location = location; this.document = document; - this.body = jqLite(document[0].body); this.head = head; this.idCounter = 0; } diff --git a/src/services.js b/src/services.js index c9799b32..89cca6fc 100644 --- a/src/services.js +++ b/src/services.js @@ -75,8 +75,8 @@ angularService("$log", function($window){ }; }, {inject:['$window']}); -angularService("$hover", function(browser) { - var tooltip, self = this, error, width = 300, arrowWidth = 10; +angularService("$hover", function(browser, document) { + var tooltip, self = this, error, width = 300, arrowWidth = 10, body = jqLite(document[0].body);; browser.hover(function(element, show){ if (show && (error = element.attr(NG_EXCEPTION) || element.attr(NG_VALIDATION_ERROR))) { if (!tooltip) { @@ -89,9 +89,9 @@ angularService("$hover", function(browser) { tooltip.callout.append(tooltip.arrow); tooltip.callout.append(tooltip.title); tooltip.callout.append(tooltip.content); - self.$browser.body.append(tooltip.callout); + body.append(tooltip.callout); } - var docRect = self.$browser.body[0].getBoundingClientRect(), + var docRect = body[0].getBoundingClientRect(), elementRect = element[0].getBoundingClientRect(), leftSpace = docRect.right - elementRect.right - arrowWidth; tooltip.title.text(element.hasClass("ng-exception") ? "EXCEPTION:" : "Validation error..."); @@ -119,7 +119,7 @@ angularService("$hover", function(browser) { tooltip = null; } }); -}, {inject:['$browser']}); +}, {inject:['$browser', '$document']}); angularService("$invalidWidgets", function(){ var invalidWidgets = []; |
