Opened 12 years ago

Closed 7 years ago

#3138 closed defect (wontfix)

Menu: on mouse click menu close, browser scrolls to last focused item

Reported by: simonjb Owned by: bill
Priority: high Milestone: 1.0
Component: Dijit Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

When the menu is closed by left clicking the mouse the browser scrolls to the last focused item if it is not on the page. To reproduce on FF (cannot test on IE right now due to #3135):

  • open dijit/tests/test_Menu.html in FF
  • click in the "hello there!" text area to give it focus
  • scroll down until the text area is not on the screen
  • open the menu with mouse right click
  • close the menu by left clicking on the page background
  • browser scrolls up so that "hello there!" is on screen

Change History (7)

comment:1 Changed 12 years ago by bill

Milestone: 0.9beta1.0

Hmm, any ideas how to fix this? We do want to restore focus to the previously focused item, right?

comment:2 Changed 12 years ago by simonjb

Yes, we want to restore focus to the previously focused item when we close with the keyboard. However, I think that when we close with the mouse we want focus to go to the item under the mouse pointer when the user clicked.

comment:3 Changed 12 years ago by bill

Hmm, I understand the reason but this worries me. Try this experiment on Windows or Mac:

  • highlight a word in Notepad or your favorite editor
  • move the mouse away
  • right click
  • select "cut"

It cuts the highlighted word even though your mouse wasn't over it. That seems like important functionality and I don't want to break it. Anyway let's think about this.

comment:4 Changed 12 years ago by bill

Milestone: 1.02.0

comment:5 Changed 11 years ago by alex

Milestone: 2.01.3

Milestone 2.0 deleted

comment:6 Changed 11 years ago by bill

Description: modified (diff)
Milestone: 1.3future

comment:7 Changed 7 years ago by bill

Milestone: future1.0
Resolution: wontfix
Status: newclosed
Summary: On mouse click menu close browser scrolls to last focused itemMenu: on mouse click menu close, browser scrolls to last focused item

I don't reproduce this, even when using firefox 3.6 and dojo 0.9. I do see the focus shift though if you click a menu choice.

IIRC though the popup code only restores focus if the focus hasn't already been shifted somewhere else. Although I don't remember if clicking a blank area of the page counts as shifting focus somewhere.

Anyway, I don't think we are going to do anything about this ticket.

Note: See TracTickets for help on using tickets.