• !DOCTYPE: Are you forcing it?

    By Lance Spellman 1 decade ago

    I've been playing around with this a lot and it appears like there is a browser DOM issue in what I'm working with.  In the mView custom control, the onMoreButtonClick function fails on initial page load at this line:

     
    var c1 = lastEntryElement.firstElementChild

    which reports back a null value.  Therefore the script stops and never gets to the prog.start() line where it would load the JSON entries from the view.  The result is a screen that shows OpenNTF.org, then More…. on the next line.  Stuck there.
     
    I made some mods to this code to use firstChild instead of firstElementChild and set c1.textContent = "Loading…" and c1.disabled = true and the view entries loaded and paged correctly.

    However, then when I click on a ListItem, it simply highlights and then does nothing.  Probing into that, I saw that in dojox.mobile._base.js in the AbstractItem class, that it would fail at getting the widget for w=dijit.getEnclosingWidget(n).  In examining that, it looks like it was taking the initial focus of the LI you'd built from the view data, going up to the parent DIV for it, and then not finding a dijit widget.  To me, it looks like it should have not been looking for the parent node of the DIV and the DIV itself would have been the node it was looking for.
     
Given that the dojox.mobile package should be working correctly, it got me thinking the issue has to be more with how the DOM is being traversed and built as it's at the core of both these issues.  I'm working with an 8.5.2 server, and it doesn't appear that the !DOCTYPE generated by an XPage has changed from 8.5.1 to 8.5.2, it's still , and it doesn't appear that you've changed anything in the XPage properties to reset it, or in xsp.properties file, to set it to standards mode.

So do you have a clue what's going on?  Will you be at LOLA in a couple of weeks?