Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    lastTarget on SectionHeader_click

    Hi,

    v9.1p_2014-07-12/Pro Deployment (built 2014-07-12) on IE9

    I've got a scenario where I have a SectionHeader with a button as control on it.
    When the button is clicked, a new row is added with scrollToRow to make sure the new row is visible.

    A few SectionHeaders are at the bottom of the visible viewport: so user sees the header, but the grid body not so much.
    When the button is clicked, the parentCanvas is shifted up so the new row can be seen.

    Now on IE10, we notice that the section collapses when we click the button. I've been debugging and it's this code:
    Code:
    function isc_SectionHeader_click :
    if (this.contains(isc.EH.lastTarget)) return;
    lastTarget is NOT the button in some cases!
    When the "canvas shift" occurs, another component than the button is under the mouse pointer. Hence this code continues and collapses the section.

    I'm going to search further in our code. Maybe it's our own application code that is responsible for the "scrollToRow" which somehow makes the panel scroll down. Maybe I can defer that and it all works again as expected.

    But I also wanted your input in using "lastTarget" here. Is that normal? Why is the button component itself not passed to this function?

    thanks,
    Attached Files

    #2
    All browsers will automatically scroll whatever widget obtains keyboard focus into view. This could explain the grid as a whole moving into view.

    If you want to clarify whether automatic scrolling due to focus is taking place, you could enable the "scrolling" log in the Developer Console. To clarify how focus is moving, enable the "nativeFocus" log.

    But I also wanted your input in using "lastTarget" here. Is that normal? Why is the button component itself not passed to this function?
    We're not sure what you mean about the button component being passed in - this is code in the SectionStack that handles any kind of circumstance, so it doesn't know about your application-specific button.

    But your experience suggests that possibly the browser auto-scrolls, then issues some kind of additional event (perhaps a mouseMove?) that is then the "lastEvent" by the time this check in the SectionStack is run. Here, enabling the "EventHandler" log would clarify what's going on.

    Comment

    Working...
    X