Ticket #1484069 (closed Bugs: fixed)

Opened 4 years ago

Last modified 23 months ago

RoundCube steals focus in app.js

Reported by: David Adam <zanchey@…> Owned by:
Priority: 5 Milestone: 0.2-beta
Component: Client Scripts Version: 0.1-beta2
Severity: normal Keywords:
Cc: zanchey@…

Description

Some users have complained that RoundCube steals focus from other applications when an operation completes.

This is due to line 178 of app.js (in revision 358):

177         // focus this window
178         window.focus();

There is a school of thought which says that acquiring focus for anything except system-critical events is inelegant UI. I would like to suggest that RoundCube avoids grabbing focus unless absolutely essential, by removing lines 177-178.

Change History

  Changed 3 years ago by seansan

  • cc zanchey@… added
  • milestone set to 0.1.1

Decide in 1.1 (fix/close)

  Changed 2 years ago by till

Hehehe... We are so evil. :P

follow-up: ↓ 5   Changed 2 years ago by till

  • milestone changed from 0.1.1 to later

Unless someone supplies a patch, I'll postpone it!

  Changed 2 years ago by alec

  • milestone changed from later to 0.2-beta

in reply to: ↑ 3   Changed 2 years ago by tensor

Replying to till:

Unless someone supplies a patch, I'll postpone it!

There are several places where RC grabs focus. Shall the patch just remove them?

  Changed 2 years ago by robin

RoundCube only grabs focus in one place (app.js), but there are 14 occurances of window.focus() in tiny_mce. I think we can keep them.

Index: program/js/app.js
===================================================================
--- program/js/app.js   (revision 1811)
+++ program/js/app.js   (working copy)
@@ -214,12 +214,6 @@

         this.set_page_buttons();

-        // focus main window
-        if (this.env.framed && window.parent)
-          window.parent.focus();
-        else
-          window.focus();
-
         // init message compose form
         if (this.env.action=='compose')
           this.init_messageform();

  Changed 2 years ago by robin

  • status changed from new to closed
  • resolution set to fixed

Fixed in r1820.

Note: See TracTickets for help on using tickets.