User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1809.0 Safari/537.36 Steps to reproduce: Create a parent div with tabindex="0". Add an anchor child to that div. Have the anchor child display:none within the parent div, but have it show when the parent div has focus. Click the parent div to give it focus which should make the child anchor appear. Then click the anchor. View http://cssdeck.com/labs/lyi3nkky Actual results: The div looses focus as expected but a click or focus are never registered on the anchor and it doesn't follow the hyper link. The following events are fired: 'focusable' = focusable parent div; 'showme' = anchor only displayed on parent focus. 1392127527420 focusable mousedown 1392127527447 focusable focus 1392127527465 focusable mouseup 1392127527472 focusable click ....mouse move.... 1392127527680 showme mouseenter 1392127527681 showme mousemove 1392127527681 focusable mousemove 1392127527695 showme mousemove ...mousemove... 1392127528043 focusable mousemove 1392127528208 showme mousedown 1392127528208 focusable mousedown 1392127528209 focusable blur 1392127528219 showme mouseout 1392127528220 focusable mouseout 1392127528220 showme mouseleave 1392127528220 focusable mouseleave Expected results: In Chrome, safari, and IE >=8 the hyperlink is followed. It seems like it should work this way in firefox too.
The link is not activated in 2014-02-17-03-02-02-mozilla-central-firefox-30.0a1.en-US.linux-x86_64 when I click it. See also bug 886268?
Why should clicking the link work? Focus is moved there from div, so the link is hidden and click event shouldn't go to the link anymore.
I think that bug 886268 is along the sames lines as the issue I am reporting. If focus is removed from the div (focusme) then focus must have been given to the link (showme) at some point, but that is never registered in the event-timeline. It seems that at least focus should be given to the link and then blur should be immediately called according to: http://www.w3.org/html/wg/drafts/html/master/editing.html#focus-management * When an element that is focused stops being a focusable element, or stops being focused without another element being explicitly focused in its stead, the user agent should synchronously run the unfocusing steps for the affected element only. I think the convention that other browsers have chosen makes more sense, but that might be covered in 886268. So at the minimum focus and blur should be called on the link (showme)? Where would focus go otherwise?