Code Monkey home page Code Monkey logo

Comments (7)

ekalinichev avatar ekalinichev commented on May 12, 2024

Same applies to bootstrap dropdowns, so probably it has something to do with absolute positioning. I'll post here if I find something.

from ember-tooltips.

sir-dunxalot avatar sir-dunxalot commented on May 12, 2024

Hey guys,

So this is likely something to with an issue in ember-tether's positioning. More specifically, tether might have an issue. I looked the issue and didn't see anything obvious.

Maybe something stands out to you?

And @ehubbell, in the example above, does the modal have position (like absolute or fixed)? And does the target (the '?' icon) also have a position of some kind?

from ember-tooltips.

ekalinichev avatar ekalinichev commented on May 12, 2024

I was able to fix the problem by setting updateFor=isDropdownOpen, where isDropdownOpen is a variable that controls display of my custom ember wrapper around bootstrap dropdown. So, looks like this:

  1. Target is dropdown, it's hidden and rendered.
  2. Ember-tooltips renders hidden tooltip, since target is hidden, ember-tether sets its position to [0, 0].
  3. Out-of-the-box when tooltip is activated, it will be just displayed, but not re-rendered, we get the bug described here.

Possible solutions:

  1. Make ember-tether re-calculate position right before toggling display on (looks like correct way)
  2. What I did, make ember-tooltips re-render when target position is changed (easier to do)

So: we have a hotfix, but it would be nice to have good behaviour out of the box, I think this problem is pretty common.

from ember-tooltips.

sir-dunxalot avatar sir-dunxalot commented on May 12, 2024

Got it. That makes sense.

Just so I make sure I understand correctly... A target element is in the DOM and the tooltip is attached. However, the target element hasn't yet been positioned or displayed? Thus, when it is displayed the tooltip previously rendered was not attached to the element's correct position because the element didn't have a position and/or the position changed?

from ember-tooltips.

ekalinichev avatar ekalinichev commented on May 12, 2024

Yes, you are right.

from ember-tooltips.

andrew-zenefits avatar andrew-zenefits commented on May 12, 2024

@jatt @ehubbell did you guys happen to find a solution for this? I've come across the same problem.

from ember-tooltips.

ehubbell avatar ehubbell commented on May 12, 2024

I actually switched to another library that let me append the tooltip to another divs ID. Lib called emberstrap. Has a bunch of bootstrap js replacements for ember that work well.

Eric (from iPhone)
720.212.1434

On Jul 12, 2016, at 21:14, Andrew Scheuermann [email protected] wrote:

@jatt @ehubbell did you guys happen to find a solution for this? I've come across the same problem.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

from ember-tooltips.

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.