From kde-commits Tue Mar 29 01:56:29 2005 From: Germain Garand Date: Tue, 29 Mar 2005 01:56:29 +0000 To: kde-commits Subject: kdelibs/khtml/html Message-Id: <20050329015629.55B14630 () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=111206140014706 CVS commit by ggarand: focus form fields on the way when filling wallet information, and *before* setting the value. Otherwise onfocus handlers might clear the last field. BUG: 100530 M +1 -4 html_formimpl.cpp 1.430 --- kdelibs/khtml/html/html_formimpl.cpp #1.429:1.430 @@ -444,5 +444,4 @@ void HTMLFormElementImpl::walletOpened(K return; // failed, abort - HTMLInputElementImpl *last = 0L; for (QPtrListIterator it(formElements); it.current(); ++it) { if (it.current()->id() == ID_INPUT) { @@ -452,11 +451,9 @@ void HTMLFormElementImpl::walletOpened(K !current->readOnly() && map.contains(current->name().string())) { + getDocument()->setFocusNode(current); current->setValue(map[current->name().string()]); - last = current; } } } - - getDocument()->setFocusNode(last); }