UI demos fail from local file:// in Firefox 9 - bad tags, bad calls in demo sources
|Reported by:||tshinnic||Owned by:|
This failure has been asked about in at least two forum postings. One mentioned 1.8.15 but didn't mention which Firefox. And this is completely independent of the security.file.strict_origin_policy Firefox setting.
With Firebug enabled various errors become evident. Breakpoints will occur in index.html's loadDemo() routine, line 188. The error message at breakpoint will say "data.replace is not a function".
Inspecting the arguments to loadDemo() will find error messages embedded at various places in the DOM returned from the load.
The initial error message declares
The demo .html files all claim "DOCTYPE html" which I understand means strict HTML and XML. However the <link> tags are not closed, e.g. <link ..... /> . Thus this is invalid XML and Firefox barfs.
Fixing the link tags in index.html and in the .html's in ./selectable now gets us to a second error message:
Oh, look, the <meta> tags are unclosed. So fix them.
Now things seem 'better' but nothing 'works'. Wander around in the loaded data and DOM, and begin to wonder whether Firefox understands this .html file accessed by the $.get() in loadDemo() is, you know, HTML?
Read some more and find that you can declare what type of file is expected. So add a third argument to the $.get() call (at line 225 of index.html) of 'html'.
Tra-la. Selectable demo now runs in Firefox. Oooo, and still runs in Chrome "16.0.912.77 m" (well, y'know, once we know about the magic --allow-file-access-from-files option).
So, fix your .html sources to validate for XML, and force 'html' data returned from $.get().
If you really want me to do a pull request to get this fixed let me know. I would think your motivation more than mine after tonight....