W3C home > Mailing lists > Public > public-mwts@w3.org > June 2008

Bug in contentEditable test

From: Harri Porten <porten@froglogic.com>
Date: Mon, 2 Jun 2008 22:34:52 +0200 (CEST)
To: public-mwts@w3.org
Message-ID: <Pine.LNX.4.64.0806022229460.21344@pudel.froglogic.com>

Hi!

The test suite for mobile browsers as available on

   http://dev.w3.org/2008/mobile-test/doc.html

has a bug in the test of the contentEditable attribute: It performs the 
following check

   if (document.getElementById('editable').contentEditable == true) {
         document.getElementById("editable").style.background="green";
   }

but contentEditable is defined to return a *string* and not a boolean. So 
this have to be

    if (document.getElementById('editable').contentEditable == "true") {
         document.getElementById("editable").style.background="green";
    }

Also see

   http://msdn.microsoft.com/en-us/library/ms537837(VS.85).aspx
   http://www.whatwg.org/specs/web-apps/current-work/multipage/section-contenteditable.html

Harri.
Received on Tuesday, 3 June 2008 04:43:25 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:08:02 UTC