Closed Bug 294718 Opened 19 years ago Closed 19 years ago

[FIXr]:hover with alternative list-style-image: image doesn't display correctly first time

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla1.8beta4

People

(Reporter: sw_bladerunner, Assigned: bzbarsky)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050518 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050518 Firefox/1.0+

I've a basic style set up on list items at
http://www.singlemalt.nildram.co.uk/mozprob/ :-
li { list-style-image: url("images/dot-off.gif"); }
li:hover { list-style-image: url("images/dot-on.gif"); }

When Firefox (latest trunk) and Mozilla 1.7.2 load the page, and the /first/
time you hover over one of the list items, it takes a while to load the image,
and then if it displays it at all, it's way off centre.

Once you mouse-out and hover over another LI, or re-hover over the same one, the
formatting is correct - just that first time.

Reproducible: Always

Steps to Reproduce:
1. Ctrl-reload the page
2. Hover over a list item
3. Gasp in mock horror

Actual Results:  
list-style-image, if displayed at all, displays in wrong place.

Expected Results:  
Load the image and display it in the correct location, as it does on subsequent
hovers.

Attempted workaround: I've tried preloading the images with a bit of javascript
- it didn't work.
Attached patch PatchSplinter Review
The comment describes what's going on here.... With this fix, preloading the
image should work great, and not preloading will flicker a tad as the new image
loads, but will render the end result correctly.
Assignee: jdunn → bzbarsky
Status: UNCONFIRMED → ASSIGNED
Attachment #190804 - Flags: superreview?(roc)
Attachment #190804 - Flags: review?(roc)
Severity: trivial → minor
OS: Windows 2000 → All
Priority: -- → P2
Hardware: PC → All
Summary: :hover with alternative list-style-image: image doesn't display correctly first time → [FIX]:hover with alternative list-style-image: image doesn't display correctly first time
Target Milestone: --- → mozilla1.8beta4
Attachment #190804 - Flags: superreview?(roc)
Attachment #190804 - Flags: superreview+
Attachment #190804 - Flags: review?(roc)
Attachment #190804 - Flags: review+
Comment on attachment 190804 [details] [diff] [review]
Patch

Requesting 1.8b4 approval for this simple fix to make sure we size the bullet
correctly.
Attachment #190804 - Flags: approval1.8b4?
Summary: [FIX]:hover with alternative list-style-image: image doesn't display correctly first time → [FIXr]:hover with alternative list-style-image: image doesn't display correctly first time
Attachment #190804 - Flags: approval1.8b4? → approval1.8b4+
Fixed
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: