Ticket #130 (closed defect: fixed)
On firefox, tiddlywiki sometimes redraws the document more than once
| Reported by: | UdoBorkowski | Owned by: | BobMcElrath |
|---|---|---|---|
| Priority: | major | Milestone: | 2.1 |
| Component: | core | Version: | |
| Severity: | high | Keywords: | |
| Cc: |
Description
(Reported in posting by BobMcElrath?)
On firefox, tiddlywiki sometimes redraws the document more than once. This is particularly noticable on tiddlylinks after an edit. The cause is that they are assigned the class "button" erroneously, which is then fixed in refreshTiddlers.
Also when "edit" is first pressed, the title of the tiddler being edited is drawn with the "tiddler" class, and later "missing" may be added, which causes the title to flash from an upright font to an italic font (with the default tiddlywiki styles).
Lastly I noticed that the defaultCommand in the toolbar was reflowing, and fixed that.
So the moral of the story is...on firefox, to avoid reflows, assign the class correctly when the element is created, rather than fixing it up or adding classes later.
Attached is a patch against 2.0.11 (but the problems still exist in 2.1.0b4). This duplicates a bit of code so perhaps someone wants to hack a better solution. Also there are probably other places which cause reflows that I didn't catch. We should probably audit the use of addClass and .className = ... Of course there are many places in the code where the class is changed dynamically to achieve interactivity that shouldn't be changed (such as in onMouseOver).

