Project

General

Profile

Bug #3952

Using a table/td element to implement AlignCenter causes WSpinner to not be down clickable

Added by Jeremiah Jahn over 6 years ago. Updated over 6 years ago.

Status:
Feedback
Priority:
High
Assignee:
-
Category:
Deployment
Target version:
Start date:
04/06/2015
Due date:
% Done:

0%

Estimated time:

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

WSpinBox.js (4.98 KB) WSpinBox.js includes fox for center scrolled spinner error Jeremiah Jahn, 04/08/2015 06:56 PM
#1

Updated by Jeremiah Jahn over 6 years ago

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
#2

Updated by Koen Deforche over 6 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

#3

Updated by Koen Deforche over 6 years ago

  • Status changed from New to Feedback

Also available in: Atom PDF