Giter VIP home page Giter VIP logo

Comments (5)

bradleypriest avatar bradleypriest commented on June 4, 2024

This is actually an issue with the removal of the default container in Ember-Core. Sadly the error coming up is a bit obtuse.

Explanation is here https://gist.github.com/stefanpenner/5627411.

There are a couple of ways of fixing it, you can pass the default container into the popup function if you have access to it from where you are calling popup.

I personally have overriden the popup method, but I have worries that it wouldn't work universally so I never contributed it back to ember-bootstrap.

Bootstrap.ModalPane.reopenClass({
  popup: function(options) {
    var modalPane, rootElement;
    if (!options) options = {};
    modalPane = this.create(options);

    if (!modalPane.container && modalPane.get("controller")) {
      modalPane.container = modalPane.get("controller").container;
    }

    rootElement = get(this, 'rootElement');
    modalPane.appendTo(rootElement);
    return modalPane;
  }
});

This is definitely something that should be fixed in ember-bootstrap, I'll have a think about it.

from ember-bootstrap.

pzuraq avatar pzuraq commented on June 4, 2024

Ah, interesting issue. It would have taken a while for me to figure that out on my own, thanks for the help!

from ember-bootstrap.

pzuraq avatar pzuraq commented on June 4, 2024

Note: To use the fix you posted the ModalPane has to be passed a controller somehow. I ended up passing it in hash I gave to the popup method.

from ember-bootstrap.

flynfish avatar flynfish commented on June 4, 2024

Any movement on this? Is ember-bootstrap going to incorporate a fix?

from ember-bootstrap.

dmathieu avatar dmathieu commented on June 4, 2024

We should indeed.

from ember-bootstrap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.