Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnDemandList: renderRow will make you lose the focus on the row #496

Closed
mercmobily opened this issue Mar 19, 2013 · 1 comment
Closed

OnDemandList: renderRow will make you lose the focus on the row #496

mercmobily opened this issue Mar 19, 2013 · 1 comment

Comments

@mercmobily
Copy link

Hi,

If

  • you have an OnDemandList based on an observable store
  • You have selected a specific row with the keyboard
  • The value for that particular row is updated

You lose the focus on that specific row. This is particularly annoying if you have an application that has live data that updates all the time, and you want the user to be able to use the keyboard to navigate this live data (it's not really going to happen).

I tried to provide a solution, but my Dojo skills suck too much -- especially when you take Dijit away from me. I actually couldn't even find a spot, in the code, where the observer triggers the rendering of the row (!).
However, the idea is:

  • A value has changed, and there's a match!
  • If the current row has the focus, set a flag
  • Re-do the rendering
  • Re-GIVE the focus to that row

I think losing the focus is going to happen no matter what because in renderRow() the whole row's DOM is replaced. So, any kind of focus is lost.

But, I might well be missing something...

Merc.

edhager added a commit to edhager/dgrid that referenced this issue Jun 28, 2013
Also added code to clean up selection settings on blur. This was not being done before. I needed it for my update and it seems like a good thing to have in general.
edhager added a commit to edhager/dgrid that referenced this issue Jun 28, 2013
Also added code to clean up focus settings on blur. This was not being done before. I needed it for my update and it seems like a good thing to have in general.
edhager added a commit to edhager/dgrid that referenced this issue Jun 28, 2013
Also added code to clean up focus settings on blur. This was not being done before. I needed it for my update and it seems like a good thing to have in general.
edhager added a commit to edhager/dgrid that referenced this issue Jun 28, 2013
Also added code to clean up focus settings on blur. This was not being done before. I needed it for my update and it seems like a good thing to have in general.
edhager added a commit to edhager/dgrid that referenced this issue Jul 19, 2013
… separate the management of the focus and the tab stop. The focused node and tab stop node should always be the same node. Sometimes the tab stop node will not have focus.
edhager added a commit to edhager/dgrid that referenced this issue Jul 19, 2013
…t the tab stop and the focus to a different row when the row being removed has focus.
@ghost ghost closed this as completed in c632766 Aug 27, 2013
@mercmobily
Copy link
Author

Hi,

Thank you for fixing this!
I saw what you did to get it fixed, and... well, no wonder I couldn't figure it out!

Thanks a million,

Merc.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant