Web Bug Track - A place to track Web bugs... in JavaScript, DOM, CSS, XHTML, HTML in all Web Browsers... Firefox, Internet Explorer, Safari, Chrome, Opera, Konqueror and more.
Note:Updated synopsis to include the select element, not just the options.
Have you ever wanted to provide more descriptive text in the form of a tooltip in your Web applications? Of course you have. It may have slipped your notice though, that this doesn't work on select list options (or even the select list itself) in IE6 (fixed in IE7).
Issue: #266 Affects: Safari 3.1/Win, 4.0 Beta/Win (readers report that this feature isn't available on the Mac)
The window.prompt() function when it first became available would allow a user to add 1 (one) line of text as an input value using a modal dialog supplied by the browser.
It turns out though, that Safari now allows users to enter more than one line of text (Enter is treated as a request for a carriage return, not to accept the value and submit the dialog).
I don't consider this a bug, but rather an enhancement to the existing dialog. (In Safari's case, it could do with a scrollbar, since it does allow more than the 3 lines it visually displays)
However this is something that developers will want to be aware of... that line breaks should be expected in the return value from the prompt call.
The JavaScript isNaN(testValue) function will return true if the testValue is Not ANumber. Likewise a false return value would signify that the testValue was actually a number.
Since Scientific notation allows the letter 'e' to be used to indicate very, very small and very, very big numbers ("e" represents "times ten raised to the power"), one can only guess that the parsing allows all digits, zero or one decimal, AND zero or one 'e' character...
Tuck that one in your JavaScript toolbelt for a rainy day. ;-)
Known Workarounds: One. If this truly worries you when reading in a value, you can run an additional test against the string...
Example Workaround Code:
var testStr = '12345e6789'; var isNumber = !isNaN(testStr); if(isNumber){ if(testStr.indexOf('e') != -1){ isNumber = false; } } alert('The test value is a number?: ' + isNumber);
Keep in mind, that '123e14' is a valid number, just likely not what your application is expecting in terms of the size of the number. ;-)
In general IE has no issues rendering Animated GIF images... however with all this Web 2.0 stuff going on where animated "spinners" are used to indicate "activity" in AJAX applications a bug has started to become exposed.
It is common to have a pre-loaded animated GIF image rendered as part of a page, that has its style (or a wrapping element) set to display:none;
Then whenever it is needed, simply setting the display to 'inline','block' or even '' will then display the animated image.
The problem is, that sometimes IE refuses to animate the image. It just sits there in a still frame as if there were no animation sequence.
It appears to be some sort of threading/race condition and is most obvious if right after setting the display back to a "visible" state the location.href is changed, or the form is submitted.
Its one of those odd bugs that doesn't always happen, but appears "glitchy" when it does.
Known Workarounds: Some kind of sorta? There are various speculations on this (and I'm opening comments on this to bring in more), but anything that attempts to reload the src of the animation afterwards, or in another thread appears to help.
Example Workaround Code:
<script type="text/javascript"> //spawn another thread to show activity setTimeout('showSpinner',150);//spawns another thread to kick off after the submit document.forms[0].submit();
function showSpinner(){ var busy = document.getElementById('busyicon'); busy.style.display = 'inline';//or try '', or 'block' } </script>
Note: Readers are indicating that you can't use dashes in IE either! e.g. 'this-name-fails'
When you open a popup window in your web applications using the JavaScript window.open() function if you must specify the name of the window, it mustn't contain spaces in IE, or the function will fail to open the window.
Example:
<script type="text/javascript"> var url = 'http://www.google.com/q?Hello=World'; var featureList = 'width=500,height=400'; var childWin = window.open(url, 'name of child win', featureList); </script>
Known Workarounds: One. Quite simple. Be sure that all your popup window names do not contain spaces.
Note: Readers are indicating that you can't use dashes in IE either! e.g. 'this-name-fails'
Example Workaround Code:
<script type="text/javascript"> var url = 'http://www.google.com/q?Hello=World'; var featureList = 'width=500,height=400'; var childWin = window.open(url, 'name_of_child_win', featureList); </script>
We're back again with another round of "Bug or Feature?" (see round one) highlighting a particular behavior in one or more browsers, that, well, could be a Bug, or it could be a Feature... we'll open up the comments for your vote and opinion.
Alright, what's todays "Bug or Feature"?
Synopsis: The HTML id attribute is designed to uniquelyidentify a particular element.
However, what if you accidentally end up with 2 or more elements with the same ID? Obviously this is a bug, but how different browsers handle it, is what makes it interesting.
All browsers tend to return the first matching element in the DOM order with the same id when using .getElementById(id). However if you have an HTML Label element, with a for attribute that points to the id attribute of a field, things aren't quite so clear.
Firefox, Safari & Opera all link to the first form element with the matching id. Internet Explorer links to the last form element with the matching id.
Question is, is IE's different behavior a bug? or a feature?
Feb. 7,2009 - Added a new Tag called Broken By Design. It is applied to all reported bugs that the browser vendor has indicated that they have no intention of fixing this bug any time soon and is therefore broken "By Design".
Feb. 7,2009 - Updated as many bug reports as possible for Internet Explorer 8 (IE8) to reflect the status of IE8 RC1 since according to the IE Blog the RTM release is coming soon. If you want to know, click to see what has been fixed?
Drag/Right-Click and save to your Bookmarks
View generated source of a page in IE View Source
Show Rendering Mode for IE6/7 Render Mode
Show Rendering Mode for IE8 IE8 Render Mode
Show how many style tags a page has # style tags