]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix log in issue, fix arrow position, make dropdown work in Firefox
authorJan-Christoph Borchardt <hey@jancborchardt.net>
Thu, 26 Mar 2015 09:55:04 +0000 (10:55 +0100)
committerJan-Christoph Borchardt <hey@jancborchardt.net>
Thu, 26 Mar 2015 10:12:02 +0000 (11:12 +0100)
core/js/js.js

index 1ae776692fed7499e7d0c3b67262e195202402fb..31ac4313eee3a3c67538f46730d8834566cc0d14 100644 (file)
@@ -1141,9 +1141,10 @@ function initCore() {
 
        // move triangle of apps dropdown to align with app name triangle
        // 68 is the additional offset coming from the logo width
-       var caretPosition = $('.header-appname + .icon-caret').position().left + 68;
-       document.styleSheets[2].addRule('#navigation:after',
-               'left: '+ caretPosition +'px;');
+       if($('#navigation').length) {
+               var caretPosition = $('.header-appname + .icon-caret').offset().left - 2;
+               $('head').append('<style>#navigation:after { left: '+ caretPosition +'px; }</style>');
+       }
 
        // all the tipsy stuff needs to be here (in reverse order) to work
        $('.displayName .action').tipsy({gravity:'se', fade:true, live:true});