Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #6306
Closed
Open
Issue created Dec 17, 2012 by Administrator@rootContributor

Fixes Tooltip/popover "in" inside placement error 2.2.2

Created by: thelonecabbage

position for the tooltip/popover is calculated correctly for position:'in right', but the element is not placed correctly for mouseover to keep the window open.

also, offset presents non-relative positioning, it was switched to simple css({})

--- /home/justin/workspace/bootstrap/js/bootstrap-tooltip.js
+++ /home/justin/workspace/niche/etzly/app/webroot/vendor/bootstrap/js/bootstrap-tooltip.js
@@ -120,9 +120,13 @@

         $tip
           .detach()
-          .css({ top: 0, left: 0, display: 'block' })
-          .insertAfter(this.$element)
-
+          .css({ top: 0, left: 0, display: 'block' });
+          
+        if (inside) {
+          this.$element.append($tip);
+        } else {
+          $tip.insertAfter(this.$element)
+        }
         pos = this.getPosition(inside)

         actualWidth = $tip[0].offsetWidth
@@ -143,8 +147,15 @@
             break
         }

+        if (inside) {
+          $tip.css(tp);
+        } else {
+          $tip.offset(tp);
+        }
+
         $tip
-          .offset(tp)
+          //.offset(tp)
+         //css(tp)
           .addClass(placement)
           .addClass('in')
       }
Assignee
Assign to
Time tracking