Hi Martijn,
thanks for the outstanding job you, Richard and Steve have done!
I'm just in the process of "webifying" a very ancient (and complex) Lotus Notes application, and needed a name picker. I embedded an other name picker first, but after a lot of work I realized that required features were missing. Then I stumbled upon your recently updated name picker, and integrated it successfully. Took some work, as I'm developing a dojo toolkit driven app with a lot of dijit.layout.TabContainers, dijit.Dialogs and so on, which somewhat collided with the popups you are providing. Mostly I was able to address these issues by tweaking the CSS and with some dojo.query calls, to avoid changing the NP libraries code. I'm very happy with that, especially that you have replaced the YUI libraries - one complex javascript toolkit (dojo) is enough for me…
However I have discovered one problem (or bug), and had to edit the libraries source code.
If you have a name field within a scrolling div tag (e. g. a dijit.layout.ContentPane within a dijit.layout.BorderContainer), and the name field is visible after scrolling down a bit, the popup will appear way below the name field. Seems like the positioning is based on the document's x/y coordinates versus the screen's x/y coordinates.
I was able to resolve that issue by just taking dojo's methods here (dojo.position). The changed code is as follows:
[code]
function _findPos(obj) {
/ replaced HPK for quick2web enable -
does not work with dijit.layout.BorderContainers with scrolling
var curleft = curtop = 0;
if (obj.offsetParent) {
do {
curleft += obj.offsetLeft;
curtop += obj.offsetTop;
} while (obj = obj.offsetParent);
return [curleft,curtop];
}// if
*/
var coords = dojo.position(obj);
return [coords.x, coords.y];
}// function
[/code]
(Not sure why the formatting is not working, but I hope, you get the idea)
While you probably won't use dojo code within your code (which would add just another dependency on a toolkit), I'm sure you will be able to solve that in direct code (main problem will be the browser differences though - dojo takes care of that very nicely).
Once again: thanks for a great job
Hans-Peter