mercadolibre / chico

A collection of easy-to-use UI components.
http://chico.mercadolibre.com
MIT License
342 stars 91 forks source link

Bubble issue #1203

Closed HGARZON closed 7 years ago

HGARZON commented 10 years ago

When defining a Bubble:

couponBubble = $.bubble({ 'content': msgDefMkt }),

The component is working only with a subscription to an event. Otherwise, doesn't work :(

For example:

couponBubble.on('show', function() { this.refreshPosition({ 'reference': $('#couponCode') }); })

atma commented 9 years ago

@HGARZON What kind of problem do you have? Can you provide more information please? Is the reference element exist and visible?

Cannot reproduce.

atma commented 8 years ago

@HGARZON Any news?

battaglr commented 7 years ago

@HGARZON, do you remember the specifics of this issue? Is this related to the Bubble not refreshing its position by itself?

HGARZON commented 7 years ago

Yes, it seems that the bubble position, if something changes on the DOM, only will change if we call the refreshPosition method.

battaglr commented 7 years ago

@HGARZON, thanks! I'll re-label this as "feature request" instead of a "bug", since what you describe is the expected behaviour —but most certainly not the ideal.

battaglr commented 7 years ago

I'll close this, since to automatically update the Bubble position we should add a MutationObserver, an Event or any other mechanism to identify if the DOM has changed. Sadly that's not aligned with the project's current objectives.

By using the refreshPosition() method this could be implemented in specific projects if necessary.

Thank you very much for the suggestion. 😀