Dojo lesson learned in upgrading from 8.5.3 to 9.0

It’s becoming increasingly the case that you can’t assume that what once worked in a previous version of XPages will continue to work in future versions. Today I have come across a case in point.

In my life at Elguji, we do a lot of hosting IdeaJam sites. To make this an easier process to manage we created a provisioning application called Jampot. It allows us to create and manage instances of IdeaJam from a central location very quickly. 


One of the features it offers is a bulk registration of users tool which runs inside a Dojo dialog box. For various reasons the contents of the dialog box are in an iFrame. In 8.5.3 this all worked very smoothly, I used the technique which Jeremy Hodge wrote about ages ago. What I found when I was re-testing on my 9.0 dev server is that when the dialog box appeared I couldn’t get the focus of the cursor to stay in a field. I could click the field (you could see it highlighting for a fraction of a second) but it would immediately blur. There was no code that I could see causing it, no CSS, nothing.

Step in StackOverflow, as ever. There’s a new switch in Dojo 1.8 which allows you to control the autofocus of fields when a dialog opens. In this case of having an iFrame inside the dialog I want to disable the autofocus for the dialog. So I can simply change my HTML in the XPage to be something like:


The point here is not my specific issue (though hopefully this will save someone the couple of hours buggering about I had to fix the problem), but that if you’re upgrading from 8.5.3 to 9.0 or, indeed, from any version to any version you can not assume that your code will continue to work.

Do you have a testing / re-testing plan in place?