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/services.js | |
| parent | 8015e09e383bcd3ebf85d44cd68c67dd85db5771 (diff) | |
| download | angular.js-748e91ba92af4a85de3579be504914092381c7e1.tar.bz2 | |
fixed some of the IE bugs
Diffstat (limited to 'src/services.js')
| -rw-r--r-- | src/services.js | 10 |
1 files changed, 5 insertions, 5 deletions
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 = []; |
