Hey Dmitriy, 2010/6/21 Dmitriy Igrishin <[email protected]>: > Hey all, > > addStyleClass() and removeStyleClass() of WWebWidget when called with force > = true > argument does not update the corresponding property of the DOM element. > The flag BIT_STYLECLASS_CHANGED should be always set when we > set styleClass_ of lookImpl_ regardless force or not force. > The applied patch solves this problem.
I do not see the problem with the existing code though. When force=true, Wt will use a JavaScript call to add or remove the styleclass from the DOM element, see lines 1284 e.a. This is done whenever transientImpl_ contains one or more style classes to be added or removed. In that case, there is no need (and it is even wrong!) to also set the entire styleClass on the DOM element. The underlying assumption is that JavaScript manipulations of the style class may have caused the widget style class and DOM element style classes to go out of sync -- and this should not be affected by adding or removing style classes. Do you have a test case that demonstrates wrong behaviour ? Regards, koen ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
