Accordion i dziwny problem w Firefoxie.

Wszystko związane ze skryptami JS, DHTML itd.
costil
Posty: 1
Rejestracja: 14 sty 2010, 20:13:13
Płeć: Niewybrana
User Agent: Firefox MacOS 1440x900

Accordion i dziwny problem w Firefoxie.

Post autor: costil »

Witam, mam pewien problem z Accordionem.

Zaimplementowałem prosty accordion w jQuery, działa ogólnie bardzo dobrze z jednym wyjątkiem. Jest problem w firefoxie i tylko w firefoxie - wszystkie inne przeglądarki działają prawidłowo.

Jedna z kart accordiona jest baaardzo długa, tak że jest największym elementem strony i zwiększa jego wysokość.

I teraz - w momencie przewinięcia do samego dołu strony i otworzenia innej karty, kiedy tamta bardzo długa się zwija występuje bardzo dziwny efekt migotania strony... niestety nie mogę podać linka do tej strony o której mówię ale podobny problem znalazłem na jednym z blogów:

http:// ajaxaspects. blogspot . com/2007/05/ accordion-menu.html

Część cytatu z bloga:

At 7/23/2008 09:29:00 PM, Anonymous Anonym said...

A really nice work of coding. But I have noticed one issue which exists - of all places - with Firefox (v2 or 3). If the accordion is folding from a content div which has an extensive amount of content (and I DO mean extensive) to another content div...as the content folds upward to hide the current content (on the exchange with the newly selected content div), the content, window, etc. experiences a type of shuddering fX.

I would love to share my URL with you, but unfortunately, behind the iron curtain of a development wall, I am unable to...that is, unless we go Live with this. But with Firefox working like it is, I doubt it will pass testing. :-(

The only way that you could test what I am saying is to (perhaps) load an inordinate amount of Lorem ipsum text in several content divs and test for yourself.

But for fewer lines of content...it works fantastic. And does, in any case, for IE6/7.

Anyone else experience this phenomenon?

Regards...David



At 7/24/2008 11:35:00 AM, Blogger MatHertel said...

The flickering is caused by a specific behavior of firefox when resiziong a web site.
If the accordion is the highest element the page height depends on it. The following happens when the bottom of the page is in view:
1. when opening another panel the size of the page changes.
2. Firefox draws this state.
3. Firefox detects that there is some space left at the bottom of the page and automatically scrolls up some pixels.
4. Firefox again draws this state.

In Internet explorer the step 2 is not executed and the flickering is avoided.




Ktoś ma pomysł jak to rozwiązać ??
Dajcie znać!!
ODPOWIEDZ