Posts Tagged ‘bug’

Plain Text vs innerText vs textContent

Wednesday, September 1st, 2010

innerText and textContent are properties that get or set the text of an element or all its children. Internet Explorer implemented innerText in version 4.0, and it’s a useful, if misunderstood feature. WebKit also has innerText, carefully copying from, and even improving upon IE; and additionally has the standards compliant textContent, which we shall see, is no where near as useful and is in fact quite different. Firefox has textContent but not innerText, and a common mistake is writing code that retrieves one or the other, assuming the result will be the same (it’s not). Opera has the property, but it is little more than an alias of textContent, which to me is analogous to false advertising.
(more…)

Webkit Unicode Bug

Thursday, August 12th, 2010

While working on the BetterVideo HTML5 player, I came across an odd bug in Safari; Unicode characters weren’t rendering correctly. What I was attempting to do was create a simple close button — a small box with an “x” in it. But I didn’t want to use the “x” character, I wanted something a little more specific. The Unicode character #&10005 is perfect, and there is a Webdings equivalent of it for Internet Explorer (small case “r”).
(more…)

iPad Bug Fix for Dynamically Created HTML5 Video

Monday, June 21st, 2010

I’m continuing my series on the iPad-targeted, BetterVideo HTML5 player which primarily targets the iPad which I first mentioned in a previous post. The player won’t be using the browser’s default controls — that would be sacrilegious for an AJAX developer who prides himself on UI design, and you can’t customize default player controls. Additionally, the HTML5 player will have the same functionality as the Flash player, so between the custom controls and this functionality, there will be a lot of JavaScript used. But even more importantly, the player is not placed on our own page; it’s designed to be used on our clients’ pages. Therefore, my preference is to provide the client with a simple bit of code and dynamically build everything that needs to be inserted into their page. This is where I ran into the iPad bug.
(more…)