Bug #3952
openUsing a table/td element to implement AlignCenter causes WSpinner to not be down clickable
0%
Description
As far as I can tell, because the AlignCenter flag uses a table to implement centering in place of a div it causes your WSpinner widget to not work. You can type, and you can click, but the value will only increase. It also causes the issues with setting the height of a form to 100% since it always causes fitHeight on line 838 of WContainterWidget to be false, because you can't default it to NOT having a AlignVerticalMask. Which means you can ever get get auto scrollbars on a horizontally centered container unless you set the size absolutely.
Files
Updated by Jeremiah Jahn over 9 years ago
- File WSpinBox.js WSpinBox.js added
A little update. This happens when you have a AlignCenter~~WScollArea~~>GridLayout->WSpinner , and the spinner container is scrolled more than the height of the spinner.
The problem seems to lie in Wt.js widgetCoordinates() function. It does it's calculations based on where it thinks it should be, NOT where it actually is. I can't seem to find the un-minified source for js/WSpinBox.js preamble, So i've attached a new prettified version here that has a work around in it. 2 edits were required. Line 95 and line 121. I then call ownerApplication.loadJavaScript("js/WSpinBox.js", preamble); in the init of my application so my preamble gets loaded first, before yours.
The workaround looks like this:
//GALEDIT
//a = d.widgetCoordinates(c, b);
a = { x: b.x - $(c).offset().left, y: b.y - $(c).offset().top };
//END GALEDIT
Updated by Koen Deforche over 9 years ago
Hey, that sounds indeed like a bug which we would like to reproduce first.
What do you mean exactly with AlignCenter?
Regards,
Koen