Avoiding uib-popover from getting clipped by uib-carousel

I have a small widget with a popover that works fine when placed inside a div, but gets clipped when inserted into a carousel.

Here's an example to illustrate what I mean: (The top image shows the widget in a div without clipping)

https://i.sstatic.net/Vgrfd.png

The second image demonstrates the popover being limited by the size of the carousel.

https://i.sstatic.net/vfvpN.png

I'm wondering if there is a way to modify the .css so that the popover does not get clipped when placed inside a carousel.

var app = angular.module('app', ['ngAnimate', 'ngSanitize', 'ui.bootstrap']);
angular.module('app').config(function() {
  angular.lowercase = function(text) {
    (text || '').toLowerCase();
  }
});

class TestController {
  constructor($scope) {
    $scope.slides = [];
    $scope.foo = "I am Test Controller ";
    $scope.currIndex = 0;
    console.log("test controller instantiating");
    $scope.slides.push({
      id: 0,
      val: "one"
    });
    $scope.slides.push({
      id: 1,
      val: "two"
    })
    $scope.slides.push({
      id: 2,
      val: "three"
    });
  }
  $onInit() {
    console.log("TestController onInit ");
  }
}

app.controller("TestController", ['$scope', TestController]);
.test-container {
  width: 140px;
  height: 75px;
  padding: 1%;
  background-color: green;
}

.carousel-container {
  width: 140px; }

.test-carousel {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  background-color: lightgreen;
}

.page {
  margin-left: 30px;
  margin-top: 30px;
}

.red-square {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 15px;
  margin-bottom: 60px;
  margin-left: 50px;
  height: 50px;
  width: 50px;
  background-color: red;
}

.blue-dot {
  height: 20px;
  width: 20px;
  background-color: blue;
  border-radius: 50%;
  border: 1px solid black;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.5/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.9/angular-animate.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.9/angular-sanitize.min.js"></script>
<script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-2.5.0.js"></script>

<link href="//netdna.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="page">
  <div ng-app="app">
    <div class="test-container">
      <div class="red-square">
        <div class="blue-dot" uib-popover="I'm a poppover!" popover-trigger="'mouseenter'"></div>
      </div>
    </div>
    <br />

    <div ng-controller="TestController" class=carousel-container>
      <div uib-carousel="" active="active" class="test-carousel" interval="0" no-wrap="noWrapSlides">
        <div uib-slide="" ng-repeat="slide in slides track by slide.id" active="active" index="slide.id">
          <div class="red-square">
            <div class="blue-dot" uib-popover="I'm a popover!" popover-trigger="'mouseenter'"></div>
          </div>
        </div>
      </div>
    </div>
    <br />

  </div>
</div>

Answer №1

It appears that consulting the RTFM would have been beneficial in this situation.

By including popover-append-to-body=true in the element with the uib-popover attribute, the issue is resolved.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

CSS: positioning controls at opposite ends of a table cell

I need help with styling a button and textbox inside a table cell. Currently, the button is stuck to the textbox, but I want them positioned at opposite ends of the cell. How can I achieve this? <td style= "width:300px"> <asp:TextBox ID="Tex ...

Cannot locate module: Error: Unable to find the path '../containers/Layout' in '/home/yusquen/Projectss/react-shop/src/components'

https://i.stack.imgur.com/U1097.png description of image goes here Issue with module: Error: The file '../containers/Login' could not be found in the 'react-shop/src/components' directory. ...

The Iframe contains its own scroll feature within the body

I am facing an issue with displaying an Iframe inside a modal. The challenge is that the content within the Iframe varies in height, making it difficult to set a fixed height for the Iframe itself. When I try setting the height to 100%, the result is a 150 ...

Angular application experiencing disobedience in TinyMCE height settings

I am struggling to adjust the height of my TinyMCE box within my Angular application because it appears very small. Following the conflicting documentation of TinyMCE, I attempted to make adjustments using the following code: $scope.optionTinyMCE = { ...

After the scaffold generator, the Twitter-bootstrap buttons now feature text in a subtle gray

I seem to be facing a similar issue to what was discussed in this thread about Twitter Bootstrap displaying buttons with greyed text. The problem I am encountering is with a btn-info button that has a dropdown - after clicking on an item in the dropdown, t ...

What is causing the div to expand even though css max-width is applied?

I am currently facing an issue with the navigation on mobile view while using Bootstrap 4. Specifically, the .nav .dropdown-menu and .text-truncate classes are not displaying ellipsis when the content text length is too long. I have attempted to resolve t ...

Retrieving pictures by their unique identification number

Utilizing a flexslider, I have set up an image display feature as shown in the JSFiddle link below. The slider has been optimized to dynamically extract images from a specific directory, where images are named with numbers like 1023, 2045, 304654, and so o ...

Dynamic graphic with integrated navigation menu

I'm looking to achieve a similar design concept like the one on this website: The navigation bar should remain fixed at the bottom of the window until you start scrolling. I am unsure if this can be done using just CSS, but I have made some progress ...

Changing the color of a placeholder using Javascript: A step-by-step guide

I've been searching online without any luck so far. I'm attempting to change the placeholder color of a text box using JavaScript, but I'm not sure how to go about it. I already have a color picker that changes colors. If my CSS looks somet ...

Having Trouble Displaying $http.get on Page

I have a JSON file named faces.json: [ { "name" : "Name One" }, { "name" : "Name Two" }, { "name" : "Name Three" }, { "name" : "Name Four" } ] I am attempting to make a GET request in my AngularJS application by including th ...

Is your jQuery TextEditor not functioning properly?

Having some trouble integrating the jQuery TextEditor plugin into my CodeIgniter project. I'm puzzled as to why it's not functioning properly. Just a heads up, my project also utilizes Bootstrap. Can anyone shed some light on why the plugin is fa ...

Formatting tabular rows to appear as headers

I am currently developing a mobile website that is specifically designed for older phones with minimal CSS and HTML support. Due to these limitations, I have decided to utilize tables in my design. My goal on a certain page is to create a table row with a ...

The URL is being modified by the Angular $compile function

I have a controller that is working well for dynamically compiling new DOM elements after certain ajax actions: angular.module('cms').controller('CompileHtmlCtrl', [ '$scope', '$compile', function ($scope, $comp ...

Tips for implementing an OR condition within an ng-repeat loop

How can I implement an OR condition within this ng-repeat loop? I am looking to filter the content of this table based on a specific value. MY TABLE <tbody ng-repeat="Fund in ListTask | filter:{CreationDate: manager.start}:t ...

Exploring how to utilize element.find() with class names in Angular's unit testing

Every time I run this test, I encounter the error Expected undefined to be true. it('needs to verify correct classes', function() { // doesn't give desired output expect(element.find('.exampleClass').hasClass('ng-hide&a ...

Arranging divs using inline-block display. How to adjust the heights consecutively?

After much searching and attempting, I am still unable to achieve a simple task. My goal is to apply display inline-block to some divs while aligning them in a row, similar to the image below: https://i.sstatic.net/iLhLS.png The issue arises when number ...

What's the best approach to retrieve JSON data within an AngularJS controller?

https://jsonplaceholder.typicode.com/posts I need to retrieve information from this URL and showcase it on the browser. In my JavaScript code, I typically perform this task by utilizing XMLHttpRequest and parsing the received data with JSON.parse(respons ...

How can I deactivate Bootstrap specifically within a certain block of content?

Is there a way to deactivate Bootstrap within a specific section? I want the styles from Bootstrap's CSS file to be overridden inside this div. ...

Having difficulty placing a marker on Google Maps

I am currently working on an application that relies on placing markers on a Google map. While the click event functions as expected when I test the code in Chrome, I am facing difficulties with recognizing the touch event on an Android device where I&apos ...

Enhanced Fancybox Version 2 adjusts iframe width to fit content

I have been attempting to adjust the width of the iframe in fancybox v2 to fit my content properly. However, every time I try, the content appears too large within the iframe and requires horizontal scrolling to view it all. My goal is to see the entire wi ...