barmalei / zebkit

JavaScript library that follows easy OOP concept, provides HTML5 Canvas based Rich UI and includes Java to JavaScript converter tool
Apache License 2.0
931 stars 177 forks source link

In Firefox the alignment of the ui is not properly set for some components #166

Closed LaxdeepBomble closed 6 years ago

LaxdeepBomble commented 6 years ago

Hi,

I was trying to create some radiobox and checkbox in canvas. But in firefox the alignment of the ui is not properly set.

Consider the following scenario;

/**demo code*/

var chk = new ui.Checkbox("test label");
root.add(chk);

/**end of code*/

Execute the above script on firefox. The checkbox is shown on canvas. Observe the difference of the alignment of the label [i.e. "test label"] and checkbox box. Label seems to have aligned at very top side.

Currently I have externally handled this ui problem by detecting the browser and setting the topPadding to some value if browser is firefox. But every time I have to handle the top padding for the components like checkbox, radiobox etc. This issue only observed for firefox and working properly in Chrome, IE 10, Edge, Safari browsers.

Issue is also observable from your site demo components on firefox. http://www.zebkit.org/light/about.html

Can you please look into the issue?

Looking forward to hearing from you.

vasu-vvp commented 6 years ago

any updates on this ?

barmalei commented 6 years ago

Just have fixed it in FF and committed the changes in GIT.