Opened 11 years ago

Closed 10 years ago

#8623 closed defect (worksforme)

Tree: hover focus can remain on for multiple nodes in FF

Reported by: Chris Walters Owned by: bill
Priority: high Milestone: 1.3
Component: Dijit Version: 1.2.3
Keywords: Cc: development-staff@…
Blocked By: Blocking:

Description

In FireFox?, it is possible to cause multiple tree nodes to have the hover focus applied. When the width of the pane containing the tree nodes is narrower that the text for the nodes, a horizontal scroll bar appears. In this state, if a user hovers over a node and moves the mouse to the right out of the pane, the hover highlight remains on. It contines to remain even if the mouse is brought back into the pane and sets the hover focus to another node, where the steps can be repeated, allowing any number of nodes to have the hover focus. The hover focus remains on for each of these nodes until a mouseout within the pane is triggered for the node. This is only an issue in FireFox?.

Attachments (2)

test_Tree_HoverFocus_bug.html (1.6 KB) - added by Chris Walters 11 years ago.
Testcase
scrollbar.html (1.3 KB) - added by bill 11 years ago.
simple test where onmouseout is working, unlike for above example where onmouseout event isn't even firing

Download all attachments as: .zip

Change History (12)

comment:1 Changed 11 years ago by bill

Summary: Tree hover focus can remain on for multiple nodes in FFTree: hover focus can remain on for multiple nodes in FF

As I usually ask, can you attach a testcase? I think I've seen this but I need something reproducible. Thanks.

Changed 11 years ago by Chris Walters

Testcase

comment:2 Changed 11 years ago by Matt Sgarlata

If you are having any trouble duplicating the issue, we spent a loooong time tracking this down, so we can definitely help get it to show up in your environment :) For me the error only showed up when both horizontal and vertical scrollbars are present, but cwalters says only horizontal ones are needed.

comment:3 Changed 11 years ago by bill

Milestone: tbd1.3
Owner: set to bill
Status: newassigned

Thanks for the test case, that reproduces for me.

comment:4 Changed 11 years ago by bill

The issue is actually in dojo/_base/event.js, in the code to simulate onmouseenter/onmouseleave events on non-IE browsers.

We aren't getting the onmouseleave event on the dijitTreeRow <div>, when the mouses leaves that node by moving over the scroll bar of the containing div.

The problem is that on FF3, when you move the mouse over a scroll bar, internally you are moving over a node like this:

<slider orient="vertical" sborient="vertical" curpos="0" maxpos="414" pageincrement="173" increment="13" flex="1" inherits="disabled,curpos,maxpos,pageincrement,increment,orient,sborient=orient"> 

I guess because this is an internal node, node.tagName is undefined. So this code in event.js triggers and the event is ignored:

try{ e.relatedTarget.tagName; }catch(e2){ return; }

comment:5 Changed 11 years ago by bill

Ugh, this is worse then I thought. Apparently when Firebug is disabled or uninstalled (not just minimized, but really not functioning), then there isn't even an onmouseout event on the div.dijitTreeRow.

This is happening on both FF3 and FF3.1 beta. I can't reproduce it with a simple test case though. (I'll attach the simple test case where it is working.)

So I can solve this problem for when firebug is running by surrounding the above try/catch block in if(dojo.isFF <= 2) but that doesn't really solve the issue. May have to refactor the code to also monitor _onBlur on the Tree itself, and/or perhaps give up the TreeNode level _onMouseEnter/_onMouseLeave handlers in favor of global handlers (for onmouseover/onmouseout) on the Tree itself).

Changed 11 years ago by bill

Attachment: scrollbar.html added

simple test where onmouseout is working, unlike for above example where onmouseout event isn't even firing

comment:6 Changed 11 years ago by bill

(In [16683]) Only do try/catch block for relatedTarget.tagName for FF2. It's not needed for FF3 and causes some issues. Refs #7216 and fixes #8555.

Also refs #8623 in that it fixes that issue (lingering hover effect on tree nodes) when firebug is enabled, but it's still failing when firebug is disabled as that's another issue.

!strict

comment:7 Changed 11 years ago by Matt Sgarlata

It sounds like maybe this is a bug in FF3. The onmouseout should fire, IMO.

comment:8 Changed 11 years ago by bill

Milestone: 1.3tbd

Hmm strangely this isn't reproducing for me anymore. Was it fixed in FF3.0.6? I tried the attachment test_Tree_HoverFocus_bug.html on both FF3.0.6/mac (tiger) and FF3.0.6/win xp. Can you see if it's still happening for you?

comment:9 Changed 11 years ago by bill

Milestone: tbd1.4

1.3rc1 has been release; bumping remaining tickets to 1.4 (except for documentation/testing tickets)

comment:10 Changed 10 years ago by bill

Milestone: 1.41.3
Resolution: worksforme
Status: assignedclosed

Yah, it seems to be working fine w/FF3.0.9 and FF3.1 beta3.

Note: See TracTickets for help on using tickets.