0

Focus issues after closing window in highlighted mode

asked 2010-06-14 18:43:34 +0800

andy1170 gravatar image andy1170
15

Hi,

I am using a window in highlighted mode as a progress dialog and using an echo event to actually kick off the processing and detach the window after the processing is complete. The code is as follows:

// opening the dialog
this.progressDialog = (Window) Executions.createComponents("/progressDialog.zul", null, null);
this.progressDialog.doHighlighted();
Events.echoEvent("onProgress", this.getWindow(), null);

//onProgress method
//do processing here
this.progressDialog.detach();
this.progressDialog = null;

The issues is that I am calling setFocus(true) on certain input components (Textbox or Decimalbox), depending on the result of the processing, but even though the cursor is flashing within the component, I have to type twice either to tab out of the component or actually enter input. This happens in both IE6 and Firefox, and the 'File' menu item seems to be highlighted in both browsers, even though the cursor is flashing within the actual ZK component.

I notice that when I use modal windows, the focus sets properly and I can start entering input straight away.

Does anyone know what is causing this behavior??

Regards
Andy

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2010-06-14 23:33:27 +0800

ashishd gravatar image ashishd flag of Taiwan
1972 6

Hi andy1170,
Could you post a runnable sample code to reproduce this issue?

link publish delete flag offensive edit

answered 2010-06-24 07:33:31 +0800

guleri gravatar image guleri
75 2

Hi
I'm having a similar problem in my application. I have an application opening a modulus dialog with an IFrame in it. Inside the iframe i have another external application doing som call backs with webservices or whatever, ending up triggering an event through javascript in the parent (my zk app) witch then again closes the dialog. If i press the "X" it seems to be ok, but calling modDialogWin.detach(); closes the window, but it keeps an invisible layer or catch my mouse click or something so i can not focus a textbox in my main window. It does not seems to be a problem on my Firefox, but in IE7 and IE8 do not work. I'm still running zk 3.6.2.

Not sure how to giva a good sample for this, i've made a custom ZK component to expose a javascript function "connected to the page".

Regards
Erik

link publish delete flag offensive edit

answered 2010-06-27 19:51:10 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

updated 2010-06-27 19:53:17 +0800

Hi andy
What version of ZK are you using?
Could you post a sample ?

Hi guleri
You can try to upgrade to ZK 3.6.4

link publish delete flag offensive edit

answered 2010-06-28 02:28:44 +0800

andy1170 gravatar image andy1170
15

Hi as1225,

I am using 5.0.4.

I have worked out what is actually going on. I is caused by using keyboard shortcuts with Firefox. The Alt + V shortcut causes the focus to return to the 'File' menu item rather than the control I want. This doesn't seem to happen in IE6 at least, and it also has nothing to do with a window in highlight or modal mode.

I am in the middle of a project at the moment, but I will try to post a sample in the next couple of days.

Andy

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-06-14 18:43:34 +0800

Seen: 390 times

Last updated: Jun 28 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More