Wednesday, March 21, 2012

ModalPopup & Screen Flicker

Just as with the other controls, when the page first loads you briefly see the controls before they are hidden. However, with the modal if you set the control's visibility to hidden, it will not display when it's poped up.

Is this a known bug? or someting else?

This behavior happens to me too...
My popup panel is declared as follow, the same as the sample included in the toolkit:

<asp:Panel ID="MoveItemDialogPanel" runat="server" CssClass="modalPopup" style="display:none;" >
...

Urhh ... it's not a bug in Atlas or the toolkit ... it's a problem with the style sheets / CSS that you used. Most, if not all, of the samples work properly as shipped. Hundreds of different posts in the forum over this particular issue.

I've run into the same problem with Collapsible, Hover and ModalPopup. What you have to be really careful of ... is ensuring that if you do copy & paste (which I did) that you ensure that you've got all of the CSS in place as well.

What Atlas (and other Ajax frameworks) are doing is taking advantage of the evolution of browsers and CSS. You get the "fast" response and neat effects in the browser(s) because the markup is already their in the DOM ... it's simply not visible and/or had its behaviors (event sinks) hooked up until necessary. This coupled with "smarter" postbacks (i.e don't post back every possible input field on the page, hidden viewstate, etc) ... result in less over-the-wire data movement ... less processing at the server and an overall "snappier" user experience.

All of this has been doable for years ... it's just really hard to hand-write all that markup and javascript ... and get all the edge cases correct.

No comments:

Post a Comment