Opened 10 years ago

Closed 10 years ago

#8858 closed enhancement (wontfix)

[patch] [cla] TitlePane: add onTitleEnter, onTitleLeave callbacks

Reported by: youngho Owned by:
Priority: high Milestone: 1.5
Component: Dijit Version: 1.3.0b2
Keywords: TitlePane Cc:
Blocked By: Blocking:

Description

_onTitleEnter/Leave method is private. I think that It is helpful when a user can use this functionality.

Attachments (2)

1.patch (840 bytes) - added by youngho 10 years ago.
2.patch (1.6 KB) - added by youngho 10 years ago.

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by youngho

Attachment: 1.patch added

Changed 10 years ago by youngho

Attachment: 2.patch added

comment:1 Changed 10 years ago by bill

Milestone: tbd1.4

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

comment:2 Changed 10 years ago by bill

Hmm, I looked at your example where mousing over the title opens/closes the pane.

It seems strange that moving the mouse from the title to the content actually closes the content; wouldn't it be better to have onMouseEnter/onMouseLeave events on TitlePane.domNode itself, so that it stayed open until you moused away from the title and content?

comment:3 Changed 10 years ago by bill

Summary: Add onTitleEnter, onTitleLeave method for TitlePane[patch] [cla] TitlePane: add onTitleEnter, onTitleLeave callbacks

comment:4 Changed 10 years ago by bill

Milestone: 1.41.5

comment:5 Changed 10 years ago by bill

Resolution: wontfix
Status: newclosed

Since [21150] the onTitleEnter and onTitleLeave callbacks have been removed completely, so it's not worth putting them back just for this case.

Actually, I think the _deferredConnect plumbing in _Widget.js will let you setup onMouseEnter and onMouseLeave handlers on a TitlePane even though there's no code for that in TitlePane itself, so that you could simply make a subclass with this code:

onMouseEnter: function(){
    if(!this.attr("open")){ this.toggle(); }
}

(and you don't even need a this.connect(this, "domNode", "onMouseEnter") call).

Note: See TracTickets for help on using tickets.