Opened 15 years ago

Closed 15 years ago

#3439 closed defect (fixed)

when close a tab pane with focus on the tab title, visible focus is lost

Reported by: Becky Gibson Owned by: davidb
Priority: high Milestone: 0.9beta
Component: Dijit Version: 0.9
Keywords: Cc:
Blocked By: Blocking:


With focus on the tab title of a closable tab pane, click on the close icon. There is no longer visible focus on any element. Focus should go to the next tab title and it should become the active pane.

Change History (6)

comment:1 Changed 15 years ago by davidb

Looks like some unfinished work in _StackButton?

onClickCloseButton: function(/*Event*/ evt){

summary StackContainer? connects to this function; if your widget contains a close button then clicking it should call this function. evt.stopPropagation();

Not sure if we are mean't to override this?

comment:2 Changed 15 years ago by bill

This is all kind of tricky. _StackButton is just the "view" to use MVC terminology, so it shouldn't have any logic in it. And note that (like in test_StackContainer.html) you can have multiple StackControllers? pointing to the same StackContainer?. Have to think about if it's worth continuing supporting that.

  1. User clicks the close button of a Stackbutton
  2. This makes StackController? send a command to StackContainer? to close the corresponding pane
  3. StackContainer? will show a new pane, and it will send a message (a topic) to all the StackControllers? like foo-selectChild
  4. each StackController? (usually there is only one) should then update the corresponding selected button to show a selected state (this works in the test_StackContainer.html)
  5. the StackController? that contained the StackButton? that was originally pressed should put focus on the new button

Step 4 must be broken...

comment:3 Changed 15 years ago by bill

PS: maybe it's as simple as adding a line to StackController::onCloseButtonClick() to set focus to the newly actived (ie, selected) button (which is set indirectly when onCloseButtonClick calls container.closeChild() )

comment:4 Changed 15 years ago by davidb

I think a recent change has broken tab pane closing.

comment:5 Changed 15 years ago by davidb

Status: newassigned

comment:6 Changed 15 years ago by davidb

Resolution: fixed
Status: assignedclosed

(In [9336]) Fixes #3439: move focus to next page when one is closed; also, provide delete key based page close. (Refs #2226)

Note: See TracTickets for help on using tickets.