Closed rthrash closed 8 years ago
If you mean when you click on a page in the tree, the focus stays in the tree, I think it depends on which browser you use. When I use Chrome, the focus seems to go to the pagetitle field at first, but when the tree finishes loading, the focus goes to the tree. When I use Firefox, the focus seems to stay on pagetitle, which is better.
I tried to find the JS file that was causing it to focus the tree. I even added some JS to our custom INIT function but no luck. Maybe @rtripault can find it.
@dubrod commenting/removing :
Should do the trick
We'll have to be careful, though, that we don't disable tree focus under all circumstances. If I'm in the tree and I expand a node, I want the focus to remain on the tree on that node, right? The problem is when the tree self-expands to match the most recent state after I do an action like save a page. When I'm saving a page or doing other things in the main pane, I want the focus to remain in that pane, rather than jump to the tree.
It's a matter of keeping track of where the user is and what actions are being performed, and then assigning the focus appropriately based on those parameters.
Definitely. The code lines mentioned in my previous message are supposed to only be executed when the trees are loaded. I guess they were here only to visually indicate a selection.
Hitting the save button indeed seems to remove the focus from the "button bar". I'll try to find the source.
Ok if save while editing it keeps focus where you are. On reload/new resource it while focus Page title
After much discussion with the core team we are going to avoid editing the core files at this time. This feature however is being considered for the next release.
@TheBoxer and I have already detailed what it takes to make this issue work and I'll detail it here for documentation sake:
,onFieldChange: function(o) {
//a11y - Set Active Input
if(o){
Ext.state.Manager.set("curFocus", o.field.id);
}
}
Line 100: ,success: function(f,a) {
after this.fireEvent('setup',this.config);
var lastActiveEle = Ext.state.Manager.get("curFocus");
var initFocus = document.getElementById(lastActiveEle);
if(initFocus) initFocus.focus();
Around line 147 ,onLoad
the following needs taken out
Ext.each(node.childNodes, function(node){
if (node.attributes.selected) {
node.select();
}
Around line 219 this.root.firstChild.select();
also needs to be taken out
This was added to 2.4 and is now active
When you edit a page from keyboard, it stays focused on the tree menu. Where should this focus/start reading?