Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: EE-3.0.0.GA, 3.1
-
Fix Version/s: EE-3.0.0.GA_P01, 3.2
-
Component/s: ACE-Components
-
Labels:None
-
Environment:Firefox, IE
Description
-
Hide
- Case11537Example.war
- 9.37 MB
- Arran Mccullough
-
- META-INF/MANIFEST.MF 0.1 kB
- META-INF/context.xml 0.1 kB
- WEB-INF/classes/com/.../example/Item.class 0.3 kB
- WEB-INF/classes/.../example/TestBean.class 1 kB
- WEB-INF/lib/commons-beanutils.jar 226 kB
- WEB-INF/lib/commons-collections.jar 558 kB
- WEB-INF/lib/commons-digester.jar 140 kB
- WEB-INF/lib/commons-logging.jar 52 kB
- WEB-INF/lib/icefaces-ace.jar 2.92 MB
- WEB-INF/lib/icefaces-compat.jar 2.68 MB
- WEB-INF/lib/icefaces.jar 336 kB
- WEB-INF/lib/javax.faces.jar 2.48 MB
- WEB-INF/web.xml 2 kB
- welcomeICEfaces.xhtml 2 kB
-
- Case11537Example.zip
- 19 kB
- Arran Mccullough
-
- screenshot-01.png
- 258 kB
-
- screenshot-02.png
- 125 kB
-
- screenshot-03.png
- 192 kB
Issue Links
- blocks
-
ICE-8558 ace:dateTimeEntry - tab order is lost after selecting a date with the mouse with ace:ajax
- Closed
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Seems that the focus should be returned to either the popup button, or the input field when a value is selected that closes the popup. Perhaps the component could keep track of which element triggered the popup display and return focus to that when it closes.
First major problem: it would get into an infinite cycle of focus-popup-select-focus ... See video: http://screencast.com/t/CWqrYSv8k.
Need to remember the handle to the focus listener (need to restructure listener if it's anonymous) and temporarily detach listener first?
There seems to be already an attempt (crude and buggy?) by the original author to restore focus, but it never worked. See screenshot-01.png.
Second major problem:
All attempts work only on FF, not on IE, even when using purely jQuery API, which is supposed to be highly cross-browser.
1. IE has strange way of handling focus event, as if the event were queued and executed a bit later. See, for example, this article: http://helephant.com/2008/01/16/focus-event-handler-run-in-different-order-in-ie-than-firefox/
2. Using the jQuery event API, a focus() will generate 2 focus events in IE. One seems to be a customized jQuery event, the other seems to a standard DOM event.
As per suggestion from Ken, used timer. Doesn't work either. See trace and explanation in screenshot-02.png. This also rules out possible causes suggested by Mark of event nesting and ordering.
Another suggestion from Ken: reset don't-show flag on blur instead of right after focus(). Working. Tested: IE7, IE8, IE9, FF15.
Modified: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\resources\icefaces.ace\jquery\ui\jquery-ui.js
Modified: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\resources\icefaces.ace\jquery\ui\readme.txt
Completed: At revision: 30636
Modified: C:\svn\ossrepo\icefaces3\branches\icefaces-3.0.x-maintenance\icefaces\ace\component\resources\icefaces.ace\jquery\ui\jquery-ui.js
Adding: C:\svn\ossrepo\icefaces3\branches\icefaces-3.0.x-maintenance\icefaces\ace\component\resources\icefaces.ace\jquery\ui\readme.txt
Completed: At revision: 30637
The popup button can be an image on a button or just the image by itself. When it is just an image, it cannot be focused or tabbed to (unless browser supports ARIA and you assign a tab index?). Whether a button or an image, the original behavior of the date picker is already to set the focus to the input field when you popup the calendar by clicking the image/button, as if you were using on focus to popup the calendar. (May be the click just calls the on focus show popup listener of the input field?)
Third major problem:
Test case doesn't have ajax submit enabled. When ajax event is added for date select, the focus is lost after coming back from server. The log trace shows that the re-focusing is being done by the framework, yet the focus can't be found anywhere. See screenshot-03.png.
Attached test case that shows this issue.
Steps: