Coder Social home page Coder Social logo

Comments (3)

mcasimir avatar mcasimir commented on August 28, 2024

Why not? I never tried, but it should

from mobile-angular-ui.

jmaicher avatar jmaicher commented on August 28, 2024

I tried it, there is one issue: We use HTMLElement.offsetParent to compute the rightHeight of .scrollable. Unfortunately, this method returns null when the element has style.display set to "none" [1], which is the case for .tab-pane's by default.

Moreover, you need to be careful where you put the .scrollable inside of the DOM. Make sure that the parent(s) of .scrollable give it some height to expand to. If the parent of .scrollable has a height of 0, the .scrollable will also have a height of 0 because 1) it has height set to 100% and only the max-height property set to some absolute value and 2) .scrollable-content is absolutely positioned inside .scrollable and therewith does not contribute to the height of its parent.

[1] https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement.offsetParent

from mobile-angular-ui.

mcasimir avatar mcasimir commented on August 28, 2024

Now i moved the mobile-angular-ui.toggle.toggled event to be fired after the classes are applied to toggleables. So, since scrollables height are recomputed on each window resize you can try something like this for now:

$rootScope.$on("mobile-angular-ui.toggle.toggled", function(e, id, active){
    var elem = angular.element(document.getElementById(id));
    if( elem.hasClass("tab-pane") && active){
      window.dispatchEvent(new Event('resize'));
    }
});

I'm uncertain about providing a public method to recompute scrollables height. It seems more of an internal stuff.

Thank you

from mobile-angular-ui.

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.