Issue Details (XML | Word | Printable)

Key: ICE-4461
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Mircea Toma
Reporter: Adnan Durrani
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ICEfaces

Current component focus is lost on input level update.

Created: 07/May/09 10:27 AM   Updated: 07/Jan/10 12:07 PM
Component/s: Bridge
Affects Version/s: 1.7.2 SP1, 1.8
Fix Version/s: 1.8.1

File Attachments: 1. File ICE-4461.war (6.29 MB)

Environment: Focus + update + input elements
Issue Links:
Dependency
 


 Description  « Hide
The focus gets lost when there is an input level update.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Adnan Durrani added a comment - 07/May/09 10:39 AM
Attaching test case which demonstrates problem with IE 7.

Mircea Toma added a comment - 08/May/09 08:15 AM
Introduce separate variable (not modified by component renderers) that keeps track of which element has focus. Restore focus on DOM update.

Mircea Toma added a comment - 08/May/09 10:17 AM
Clear focus variable on blur.

Ken Fyten added a comment - 11/May/09 01:29 PM
This fix doesn't seem to be impacting ICE-4401 and other similar tests positively.

Mircea Toma added a comment - 12/May/09 09:05 AM
Edit updated 'input' element instead of replacing it. Update style properties individualy so that IE will render new style since element.setAttribute('style',...) doesn't work as expected.
There's a simpler solution described here but it does not work in IE7: http://www.quirksmode.org/bugreports/archives/2005/03/setAttribute_does_not_work_in_IE_when_used_with_th.html .

Ken Fyten added a comment - 12/May/09 10:43 AM
Note that the way that input elements were being updated was changed in 1.7.2 for ICE-3335. Back then instead of just updating attributes the entire element was replaced as a mechanism to work around IE not updating the rendered output based on changes to the style attribute on the element.

However, this change resulted in other undesired side-effects, such as focus being lost in IE after the input element was updated in certain cases. The new fix keeps the original elements, so avoids the focus loss issues, but uses a new technique of changing the style attribute via the JS API instead of just updating it in the DOM, which solves the issue of IE not interpreting the new style values when they are updated.

Adnan Durrani added a comment - 12/May/09 11:21 AM
enhanced testcase