properties.bubble.height has started failing me.
Has anybody else got the same issue? I have filed a bug report.
What confuses me is that the plugin builder documentation currently states that height: function() - returns a Number… i.e. it is a function.
Yet in all of my plugins I refer to an element’s height as simply a key value using properties.bubble.height (as opposed to properties.bubble.height())
I call the value in the same manner. I have only had issues using the height calls in the preview.
open this page and view the console to see what i amm talking about.
here is the code i am using
setTimeout(function(){
let el = document.getElementById('outer')
setInterval(function(){
console.log(el.getBoundingClientRect().height )
instance.setHeight(el.getBoundingClientRect().height)
}, 500);
},1500)
outer is a div i use that changes height every few seconds.
for some reason, i get a value of 0 which is wrong. also, set height doesnt work here or in the responsive editor but in the live app it looks and works great
I don’t think that Bubble will trigger the setHeight function in preview/editor. This function doesn’t just set the element height, but also recalculate the page height (and parent). This is not needed in editor (and I guess, it may lead to unwanted behavior if this was updating). However, you may calculate thing inside your own preview. Just not using the setHeight function.
@exception-rambler Where do you see the properties bubble height function? I just don’t see this in my plugin (checked in update and preview, according to screenshot, it’s probably preview). But it may be on most recent version and actually I doesn’t have a plugin on last editor version.
Thanks @jared.gibb
Are you doing this from the plugin editor using the properties.bubble object’s methods, or are you using HTML’s .height property and .setHeight method?
Any reference to properties.bubble.height etc. ran fine up until now, which makes me think this is a Bug. It’s just weird for me that the documentation now refers to a function(), in which case saying properties.bubble.height wouldn’t actually make sense in any case.
Would you be able to screen shot what you’re seeing in the documentation accordion / dropdown?
Interesting.
On the version that I am on all of those properties have switched from key values to a function().
Yes definitely stay where you are for now! I wish I could go back - I’m not sure it’s possible.
This remains broken, and now I’m seeing .setHeight() also failing.
The latter is a big deal across lots of plugins. I can see Zeroqode Multi-Uploader failing to adjust height now and the same is true for my own plugins. For many applications this will be a breaking change.
I never heard anything back from Bubble on my previous bug report. Loathed to raise this type of thing when I hear nothing back.