0

Focus problem on Full Screen!

Hi all,

I had an A button call a container object which contained a B button. After the A button has called the container object, I want to focus to the B button.
So I did the following in my code:

[Container_Name].[B_Button].element.focus();

However, my hope is exactly, the focus still focus in the A button. And I re-test by debug: /dump …[B_Button].element after I saw wantsFocus: true.
Who can help me explain this?

Note: In old version is ok, but new version is fall.

Thanks and Regards,
Hoa Tat.

by
7 Replies
  • More a problem with focus...

    My view has a grid(focusable)] with 3 rows and some controls (unfocusable). At the first time we visit this view, it shows well (the focus goes to up and down with the index of row), but if we go to another views, and go back, the focus is on the 3rd row, it must be focused on the 1st row.

    If you know, please help me. :D
    0
  • QUOTE (Jerry Dang @ May 18 2009, 08:02 AM) <{POST_SNAPBACK}>
    My view has a grid(focusable)] with 3 rows and some controls (unfocusable). At the first time we visit this view, it shows well (the focus goes to up and down with the index of row), but if we go to another views, and go back, the focus is on the 3rd row, it must be focused on the 1st row.


    Was the 3rd row the one you left from when going to the next view? If so, then that is as designed. Buttons should resume where you left when you hit back.

    -Jeremy
    0
  • QUOTE (Jeremy Johnstone @ May 18 2009, 01:28 PM) <{POST_SNAPBACK}>
    Was the 3rd row the one you left from when going to the next view? If so, then that is as designed. Buttons should resume where you left when you hit back.

    -Jeremy


    Hi Jeremy,

    My problem is same as the 2nd question in the topic has been posted: "Grid focus problems".

    "2. In our grid of six items, when navigating around the view, going from the top(home button) to the bottom (green settings button), we get inconsistent results. From the green button we press up and the highlighter lands on the top item in our grid. From the home button we press down and the highlighter lands on the bottom item of our grid. This is unintuitive, can we override this behaviour?"

    My grid has 3rows, going from the home button to the bottom, the focus will land on the 3rd row, going from the setting button, the focus will land on the 1st row.
    You said that it is fixed in the latest framework, i wanna know which version of framework and when it is released, Jeremy. Currently, i set up WDK ywe-wdk-0.9.5-33-i386.
    Please help.

    Thanks.
    Jerry ^ _ ^
    0
  • Hi Jeremy,

    Thanks for your support, but I have a problem that is hard to understand. When I focused on a button and clicked its after this button had not focused;however, I re-clicked enter then click event of this button still happened. I want to keep the focus event of this button, so in select event of this button I used [Button].focus but the above problem still happened.

    Please give me help about this problem. Is it error of Framework or my error?
    Thanks and Regards.
    Hoa Tat.
    0
  • QUOTE (tatquanghoa @ May 20 2009, 07:15 PM) <{POST_SNAPBACK}>
    Hi Jeremy,

    Thanks for your support, but I have a problem that is hard to understand. When I focused on a button and clicked its after this button had not focused;however, I re-clicked enter then click event of this button still happened. I want to keep the focus event of this button, so in select event of this button I used [Button].focus but the above problem still happened.

    Please give me help about this problem. Is it error of Framework or my error?
    Thanks and Regards.
    Hoa Tat.


    I think it's your error, but I need to see a code sample to be sure. Either way, send me a code sample and I can either fix the Framework issue or provide you with the help you need to fix the problem.

    -Jeremy
    0
  • Hi Jeremy,

    According to your request was send my code to you the following:

    CODE
    createView: function() {				
    // create up image
    this.imageDown = new KONtx.control.Button({
    title: null,
    content: new KONtx.element.Image({
    src: $rallypoint.images.fantasyScores_imageDownOff,
    styles: this.config.subStyle.imageDownOn,
    }),
    styles: this.config.subStyle.imageDownOn,
    events: {
    onSelect: function(event) {
    this.focus();
    this.content.src = $rallypoint.images.fantasyScores_imageDownOn;
    },
    onFocus: function(event) {
    this.content.src = $rallypoint.images.fantasyScores_imageDownOn;
    },
    onBlur: function(event) {
    this.content.src = $rallypoint.images.fantasyScores_imageDownOff;
    },
    },
    }).appendTo(this);

    },
    }

    Please help me share this problem.
    Thanks and Regards,
    Hoa Tat.
    0
  • Hi,

    First of all, please don't call <object>.element.focus(). There is an <object>.focus() method on all focusable items and should be the one you call. In general (with few exceptions), you should not need to touch the .element property directly.

    Now, as to your question, can you post actual code instead of pseudo code? What you described should work and is done a lot in various widgets, so the problem is in how the code is done, not the concept of what you are trying to do.

    -Jeremy
    0

Recent Posts

in General - Yahoo! TV Widgets