PDA

View Full Version : Better focus management



dbassett74
27 Aug 2009, 1:33 PM
It would be nice if a future release would incorporate better focus management, in the following areas:

1) Not have to specify some arbitrary delay value in Component.focus(). Focus should be guaranteed. Seems like focusing componenets is very sketchy at best. For example, in some cases, I can specify 100 millisecond delay, other times I have to specify a longer delay. And often times, when something WAS working at 100, it no longer works, and has to be bumped up. Seems to be affected by any slowdown of client computer. Should not be affected by this.

2) Ext.Window should not steal focus from it's body. For example, if you have a panel inside the window, and a textfield on the panel, and it is currently focused, grabbing the window and resizing it or moving it, should not remove focus from the textfield. It seems this is technically possible since Dojo somehow manages to accomplish this.

3) Not really related to focus, but it would be nice if the LoadMask would not cover other windows that it was not initially set on. For example, if I have a grid with a long load time and it has a LoadMask specified and I open a window on top of the grid, the LoadMask from the grid shows on top of the newly opened window, which is obviously incorrect.

The above a really annoying and should really be fixed if possible.

TheBerliner
28 Aug 2009, 9:08 AM
I am new to EXT and JS and I am asking if these problems may be the cause for my problem of loosing focus as described here (http://extjs.com/forum/showthread.php?p=380215#post380215)?

dbassett74
28 Aug 2009, 9:17 AM
Don't know for sure, but most likely. As powerful of a library as ExtJS, focus management seems to be its weak point. Dojo seems to have much more robust focus management. I really believe the ExtJS crew should spend some time on this topic. Calling focus on an element should be guaranteed. It should not rely on specifying a delay to "attempt" to set focus. Can someone with a Premium Membership post this in a the Feature Request forum??

TheBerliner
28 Aug 2009, 9:35 AM
Tx for your reply. Documentation is the greatest weakness of EXT in my view.

I guess the main problem is that this has become a venture capital driven company and this ugly breed of bankster sharks is not customer oriented but driven solely by endless greed for profit (and this word has in German a very bad taste). I am very happy to have declined all such offers for my ventures so I was not forced to sell my soul to such people. But in the US many things are different, unfortunately.

dbassett74
28 Aug 2009, 9:37 AM
I guess the main problem is that this has become a venture capital driven company....

Yikes, is that true?

TheBerliner
28 Aug 2009, 9:52 AM
Yikes, is that true?
Just look at their company imprint!

The whole US of A is driven into abyss by such "spirit". And they are trying the same with us in Europe. Money, greed and profit is their trinity.

Animal
28 Aug 2009, 10:04 AM
There was a bug in Ext.Window which meant that when .toFront() was called on it, it focussed its focus element (a hidden <a> element which is used as a focus holder)

The fix in SVN is



toFront : function(e){
if(this.manager.bringToFront(this)){
if(!e || !e.getTarget().focus){
this.focus();
}
}
return this;
},


Does your Window class have that code for its toFront method? It only focusses that <a> element if the toFront was the result of a mouse click... the "e" argument being the event. It it's just called by the show method with no args, it does not distrurb any focus.

TheBerliner
28 Aug 2009, 10:35 AM
This is the code in my case posted here (http://extjs.net/forum/showthread.php?p=380215#post380215). So it presumably something different.

abe.elias
28 Aug 2009, 1:08 PM
Yikes, is that true?


We are not venture backed, we are 100% funded by our community. I'd venture (pun intended) to say that TheBerliner is just making an assumption.

aconran
28 Aug 2009, 1:17 PM
It would be nice if a future release would incorporate better focus management, in the following areas:

1) Not have to specify some arbitrary delay value in Component.focus(). Focus should be guaranteed. Seems like focusing componenets is very sketchy at best. For example, in some cases, I can specify 100 millisecond delay, other times I have to specify a longer delay. And often times, when something WAS working at 100, it no longer works, and has to be bumped up. Seems to be affected by any slowdown of client computer. Should not be affected by this.


Unfortunately there is little we can do here, if the dom throws an error when focusing then we simply have to trap it and go along with our business. This is a browser bug that unfortunately affects all libraries.



2) Ext.Window should not steal focus from it's body. For example, if you have a panel inside the window, and a textfield on the panel, and it is currently focused, grabbing the window and resizing it or moving it, should not remove focus from the textfield. It seems this is technically possible since Dojo somehow manages to accomplish this.

hrmm... This is a feature ;) Each Window has a separate Ext.Element called a focusEl which we subscribe to events, this allows us to do things like close the window when a user presses escape. Take a look at the docs for Window's focus (http://extjs.com/deploy/ext-3.0.0/docs/?class=Ext.Window&member=focus) method. You could easily override this to provide the behavior that you desire or you could remove the focus implementation completely by doing this:


focus: Ext.emptyFn




3) Not really related to focus, but it would be nice if the LoadMask would not cover other windows that it was not initially set on. For example, if I have a grid with a long load time and it has a LoadMask specified and I open a window on top of the grid, the LoadMask from the grid shows on top of the newly opened window, which is obviously incorrect.

The above a really annoying and should really be fixed if possible.

We have some z-index management issues that we are looking to address in an upcoming release. Please post a simple example that illustrates your problem in the Bugs forum so that we can determine if this is a bug or an implementation error.

TheBerliner
28 Aug 2009, 2:47 PM
We are not venture backed, we are 100% funded by our community. I'd venture (pun intended) to say that TheBerliner is just making an assumption.
No, not an assumption but perhaps did misinterpret this phrase in your own profile:


"Abraham's results driven management and introduction of commercial open source solutions enabled BH Capital to become one of the fastest growing privately held companies in Florida."as though you were a VC delegate to EXT. Maybe - and hopefully - this is wrong.

I have my own very bad experience with VC sharks, altough not in my company, some of whom tried to swallow me and my ideas during the Internet bubble. I am still happy to habe rejected these deals.

abe.elias
28 Aug 2009, 5:20 PM
I'm not a VC, I'm a developer at heart - just like you.

Unfortunately, there is good and bad in any industry. Understandably, your experiences with VC's have left you with a negative impression. Based on what you've shared, my feelings would be similar.

I have been fortunate. My experiences have been positive. I have met unique individuals whom have enabled me to share in my creative development.

When choosing a direction for any project we must delicately balance between capital/risk and our ability to innovate. As I pursue future endeavors, I too prefer caution.

TheBerliner
28 Aug 2009, 5:33 PM
I'm not a VC, I'm a developer at heart - just like you.
I am very glad to hear this, also because I am integrating your product into mine, which in mid- and long-range terms will most likely lead a lot more users to EXT. Thus, I have my own interest in your success.


Unfortunately, there is good and bad in any industry. Understandably, your experiences with VC's have left you with a negative impression
Well, I doubt there is much "good" in this VC industry. I have seen too many innovators being cheated etc by these banksters that the few exceptions only prove the rule.

Unfortunatly, we live today in a greedy system that puts capital far above brain, spirit and work. And that is always wrong! Just look at this idiotic US (not only software) patent system that they are now trying to impose on us in Europe, until now in vain but they keep trying. It only makes the big guys bigger.


I pursue future endeavors, I too prefer caution.
Yep! Right!
My motto: With God but without banks, shareholders and VC