Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
140
WebDataTree - Error when focusing via Javascript
posted

We have a project that uses the WebDataTree for the main menu. When upgrading to the latest service release of 2017.2  the code that we use to see the keyboard focus to the tree fails (error details below). We are using the following code to put the keyboard focus on the tree.

var trTree = $find("trMainMenu");
var feTree = trTree.get_focusElement();
feTree.focus();

It looks like the fix to Bug #242338 is causing the problem. In the code below "aNode" is null, so aNode._get_owner() fails.

// I.G. 12/Dec/2017 Bug #242338 When tree is in template of WebExplorerBar first node that is selected always remains selected.
//getItemFromElem(elemAtPoint) returns any node element (because it only ckecks for address) and so it can return an WebDataTree node instead of a WebExplorerBar one.
// There should be a check.to make sure it is an WebExplorerBar node.
if (aNode._get_owner() !== this) {
    aNode = null;
}

Can you please confirm that this is an issue, caused by your bug fix and advise on when we can expect this issue to be resolved.

Parents
  • 530
    Offline posted

    Hello Kurt,

     

    I am working on your inquiry. Using the latest Service Release(2017 vol.2 2051 build), I am not able to reproduce the error.

    Can you check if the error is reproduced with the attached sample and steps below?

    Steps:
    1.Run the sample
    2.Select a node
    3.Click the button

     

    In the button click, the following code is executed:

    function test() {
    
       var tree = $find("WebDataTree1");
    
       var elem = tree.get_focusElement();
    
       elem.focus();
    
    }

    If additional code is required, or steps are different, would you let me know that?

    WebDataTree.zip

Reply Children