Results 1 to 7 of 7

Thread: Refresh grid without loosing focus elsewhere

  1. #1

    Default Refresh grid without loosing focus elsewhere

    Hey All,

    I have a few panels that are always open in my application. One of them contains a grid that is full of project updates. I made a 'task' that runs every minute that causes the grid to reload itself. However, this causes the focus to be lost elsewhere, so if I'm in the middle of typing an update and the grid refreshes, the box that I am working in looses its focus and I have to click back into it [as you can imagine, annoying at best]. Is there any way to prevent focus from going to the grid panel every time it reloads?


  2. #2


    I would also like to know the answer to this!

    Have you perhaps found a solution?

  3. #3


    Unfortunately I haven't - there are so many other things that I need to finish up with this project that I haven't gotten the chance to sit down and try and fix this bug. The biggest problem is that I (think I) can't just programmatically set the focus back to a particular window or field, as I have no idea what the user might be doing during that refresh..

  4. #4
    Sencha Premium Member steffenk's Avatar
    Join Date
    Jul 2007
    Haan, Germany


    Imho it's a bad idea to reload the grid every minute, it's far from user friendly. You may poll and look for data change, but use a button that is highlighted if data changed, force user to press that button.
    vg Steffen
    Release Manager of TYPO3 4.5

  5. #5


    In this case the client wants as little need for the user to click buttons as possible - this is just a changelog of sorts, showing all of the changes/additions/updates to a project and it's tasks, files, notes, etc. - and there are multiple users on a system capable of making those changes/additions/updates. Think of it almost like a chat window - forcing a user to hit a button every time (s)he wants to see what's going on wouldn't make a whole lot of sense.

  6. #6


    The problem might be that, when you modify the contents of the DOM, the browser's going to very likely lose focus because it has repainted the screen. If you make modifications that do not involve the DOM itself, this doesn't happen.

    Browsers do it differently. Different versions of the same browser do it differently.

    For instance, "dot-net" gets away with a lot of things by virtue of having ActiveX controls ... which are separate beasts unto themselves and not part of the DOM. The browser provides the container-space for a grid and maybe the data-transport channel but it does not directly control what the grid is doing within its square box of real-estate. In addition, the vendor of dot-net owns the browser implementation ... the only browser that really matters to dot-net.

  7. #7


    Well, fixed it. This was a stupid thing on my part. I had added event listeners to the Ext.Ajax so that when something was going on, the user would see a little tiny box pop up in the bottom right part of the screen. Well, that box popping up would steal the focus from whatever field was currently active. The grid reload now works normally. Anyway, thanks everyone for their input.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts