为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Autofocus of tabs through javascript

  • 3 个回答
  • 1 人有此问题
  • 14 次查看
  • 最后回复者为 philipp

more options

Hi,

We have a critical concern in one of the application we are developing. The functionality works perfect on Google Chrome but it doesn’t work on Firefox (or atleast we are not able to make it work).

Below is our scenario:

1. Application is developed in ASP.NET 2. There are 4 menu items (A,B, C and D) on the application. 3. Each menu items has a parameter which displays different set of information on the page. 4. When we click on say A, it take parameter as 1 and opens a tab. When I click on B, it takes parameter as 1 and open a new tab with other set of information, and so on. 5. Now, then I am on B and already have a A tab open, if I click on A Menu on B, it should automatically redirect to A and the focus should shift on A. 6. Current, we are able to reload the A tab with new parameter, but the focus doesn’t shift on that A tab.

Is there anything we are missing? Request you to please help us here.

Jai

Hi, We have a critical concern in one of the application we are developing. The functionality works perfect on Google Chrome but it doesn’t work on Firefox (or atleast we are not able to make it work). Below is our scenario: 1. Application is developed in ASP.NET 2. There are 4 menu items (A,B, C and D) on the application. 3. Each menu items has a parameter which displays different set of information on the page. 4. When we click on say A, it take parameter as 1 and opens a tab. When I click on B, it takes parameter as 1 and open a new tab with other set of information, and so on. 5. Now, then I am on B and already have a A tab open, if I click on A Menu on B, it should automatically redirect to A and the focus should shift on A. 6. Current, we are able to reload the A tab with new parameter, but the focus doesn’t shift on that A tab. Is there anything we are missing? Request you to please help us here. Jai

所有回复 (3)

more options

hello Jai, for security reasons websites cannot change focus between windows/tabs in firefox by default. you could try to work around that if you set the dom.disable_window_flip preference in about:config to false, but this would have to be done manually by every user of the application...

more options

Hello Philip, I have set the dom.disable_window_flip preference in about:config to false, but the focus doesn’t shift on another tab.

Please help us here...

more options

we probably cannot help you with issues around development in this venue - you might get better feedback when you ask that question on a site like https://stackoverflow.com ...