[Project_owners] Firefox 3 - text fields inside list items

Adam Judson adamsplugins at gmail.com
Mon Dec 17 05:31:40 PST 2007


I'll try it, but I won't like it.

The lack of focus methods is intentional, as I wanted focus to only go
to the textfield if that was where the user clicked.  They need to be
able to set focus to the list item as that's where I put the context
menu.

Now that I think about it, that might make the setTimeout hack a bad idea...

A

On 17/12/2007, Eric H. Jung <eric.jung at yahoo.com> wrote:
>
> --- Adam Judson <adamsplugins at gmail.com> wrote:
>
> > Inside tamper data I insert entry fields into list items, into a list box.
> >
> > In Firefox 3, I can't seem to use the mouse to give the entry field
> > focus, I need to press tab once the list item has focus.  It used to
> > work...
> >
> > Any one else seen this, or have a quick fix?  Any one have the URL for
> > Firefox 3 XUL etc. changes handy?
> >
> > Adam
> >
> > The code - from
> >
> http://www.mozdev.org/source/browse/tamperdata/src/chrome/content/tamperPopup.js?rev=1.14;content-type=text%2Fplain
> >
> >    addDetailRow : function(parent, type, name, value, dataObjIndex) {
> >       var item = document.createElement('listitem');
> >       item.setAttribute("tamper.name", name);
> >       item.setAttribute("tamper.value", value);
> >       item.setAttribute(TamperPopupDialog.DATA_OBJECT, dataObjIndex);
> >       item.appendChild(this.createCell(name));
> >       var ef = this.createEntryField(name, value);
> >       ef.setAttribute(TamperPopupDialog.DATA_OBJECT, dataObjIndex);
> >       item.appendChild(ef);
> >       parent.appendChild(item);
> >       return ef;
> >    },
> >
> >    createEntryField : function(name, text) {
> >       var cell = null;
> >       cell = document.createElement("textbox");
> >       cell.setAttribute("tamper.name", name);
> >       cell.setAttribute("tamper.ef.name", name);
> >       cell.setAttribute("value", text);
> >       cell.setAttribute("onchange", "TamperPopupDialog.valueChanged(this);");
> >       return cell;
> >    },
>
> I don't see any focus() methods above. Did you try cell.focus()? In any case, I also had focus
> problems with PasswordMaker on FF3 but for a password field textbox. I was told to use setFocus()
> as the callback to setTimeout(). It worked. What a hack.
>
> setTimeout(0, "cell.focus();");
>
>
>
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> https://www.mozdev.org/mailman/listinfo/project_owners
>


More information about the Project_owners mailing list