Safari - Niggle Me Softly
Had the fun of trying to sort out a few wrinkles in how Macintosh Safari browsers render pages/execute javascript this weekend. I had 3 minor niggles to sort out, 2 of which only affected me personally on this blog, and one that would affect anyone using the d2b category system.
Safari Niggle #1 - The header area of phydeaux3 was trashed in Safari. The background was extending down past it's assigned height.
Safari Niggle #3 - On phydeaux3, I have setup a script which adds an 'open in new window' icon for external links. Not working at all in Safari. Along with a script that would change the style of comments made by ME was not working in Safari either. They just failed without any whimpers.
Image Showing Safari Niggles #1 and #2 - Header extends past it's assigned height and separator between category names should have a space before AND after the | symbol.
Hover Over to Magnify
Fix for niggle #1 - Realized it was the positioning of the background-image that seemed to be causing the issue, Safari wasn't respecting the assigned height of the container when the background image was positioned, showing the whole image. Fix was to resize the image so positioning wasn't necessary. Found this bugzilla report AFTER wards that seemed to say the same thing.
Bug 7771: CSS Background Image breaking out of containing block
Fix for niggle #2 - I took a guess. Realized that the one thing different about the way I had added the category separators was I used a shortcut .innerHTML rather than taking the extra step and adding it with a document.createTextNode. So took a shot. Seems to work as advertised now. d2b Updated.
Fix for niggle #3 - Whilst searching for a relevant bug that would explain niggle #2 (never found one) I ran across this bug report.
Bug 8080: getElement* returns nodeList that cannot be used with for...in
Now when I first read it I thought 'interesting', but since I was focused on looking for something related to the other niggle, didn't realize this was the answer to this niggle. Until it popped into my head about two hours later, ok I'm a little slow. Rewrote the scripts to use a more verbose
for(p =0; p <ar.length; p++)
rather than the prettier
for(p in ar)
and Safari seems to be happy with those scripts now as well.
How was your weekend? :-D
Safari Niggle #1 - The header area of phydeaux3 was trashed in Safari. The background was extending down past it's assigned height.
Safari Niggle #2 - When using d2b, when the category list was shown either in the posts 'category links' OR when the selected category was displayed, the customizable variable for the displayed separator wasn't being rendered correctly. If a space was entered into the variable BEFORE a 'real' character, then that space was ok. But a space entered AFTER a 'real' character wasn't being rendered at all. This not only didn't look right, but if no spaces were defined before a 'real' character AND a long list of 'categories' ensued, Safari would then treat that line as an unwrappable long word. Minor, but not good.
Safari Niggle #3 - On phydeaux3, I have setup a script which adds an 'open in new window' icon for external links. Not working at all in Safari. Along with a script that would change the style of comments made by ME was not working in Safari either. They just failed without any whimpers.
Image Showing Safari Niggles #1 and #2 - Header extends past it's assigned height and separator between category names should have a space before AND after the | symbol.

Hover Over to Magnify
Fix for niggle #1 - Realized it was the positioning of the background-image that seemed to be causing the issue, Safari wasn't respecting the assigned height of the container when the background image was positioned, showing the whole image. Fix was to resize the image so positioning wasn't necessary. Found this bugzilla report AFTER wards that seemed to say the same thing.
Bug 7771: CSS Background Image breaking out of containing block
Fix for niggle #2 - I took a guess. Realized that the one thing different about the way I had added the category separators was I used a shortcut .innerHTML rather than taking the extra step and adding it with a document.createTextNode. So took a shot. Seems to work as advertised now. d2b Updated.
Fix for niggle #3 - Whilst searching for a relevant bug that would explain niggle #2 (never found one) I ran across this bug report.
Bug 8080: getElement* returns nodeList that cannot be used with for...in
Now when I first read it I thought 'interesting', but since I was focused on looking for something related to the other niggle, didn't realize this was the answer to this niggle. Until it popped into my head about two hours later, ok I'm a little slow. Rewrote the scripts to use a more verbose
for(p =0; p <ar.length; p++)
rather than the prettier
for(p in ar)
and Safari seems to be happy with those scripts now as well.
How was your weekend? :-D
Hover Over to Magnify