Needs review
Project:
Compact Forms
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Aug 2009 at 17:17 UTC
Updated:
6 Sep 2010 at 00:11 UTC
This patch adds some nonsense I had to implement for a client:
Depending on the amount of CSS/JS loaded, it can take some time until Compact Forms' behavior is applied to the DOM. In this small time-frame, the browser renders form labels displaced, i.e. where they would appear without JavaScript being enabled.
The quick fix was to screw users without JavaScript and just hide the labels via CSS upfront. Users having JavaScript disabled won't see any form labels.
I'm not sure how to solve this properly, so feedback + ideas are welcome.
| Comment | File | Size | Author |
|---|---|---|---|
| compact_forms.hide-flicker.patch | 1.51 KB | sun |
Comments
Comment #1
sunComment #2
mstrelan commentedI did something similar to this on a site where the client wanted everything to load in the background and then fade in. It was very heavy with javascript and images so you can imagine the same sort of flickering effect but on a larger scale. My approach is really ugly but was the only way I could get it to work.
<head>tag add some really awful JavascriptYou could probably use
display: nonebut some of my other Javascript depending on elements having widths and heights rendered$(document).ready()you can use Javascript to display the labels.Mine was even more complicated because it had to fade in, and the jquery animate function only animates visible elements, so in the ready function I had to set the opacity to 0, visibility to visible and then fade it in to opacity 1.