William Ross wrote:
On 20 Jan 2006, at 17:30, Charles McNulty wrote:
Robi wrote:
- I'm pretty stymied by the scrollbar problem with selecting messages
that are not on the visible part of the list. If anyone has any suggestions, I'd love to hear them.
Yes, interesting problem, one would think the window would move with the selection as expected. Is there a way to detect when this happens? Or will it be something like the variable for the number of emails per page set elsewhere.
-- Robi
For now I'm only worrying about one page at a time. I figure that users can paginate themselves - it would be pretty unexpected behavior for a tab or page down to load a new window and would open up a whole new can of worms.
I don't think any form of moving the scroll bar based on the number of messages would work. The length of the messagelist is going to have to do a lot with font size and that sort of thing. I was thinking that assigning focus to some invisible element might do the trick, that's what I'm going to try next (probably this afternoon - boss is on vacation today which means today is an RC day! :)
Could it be as simple as checking the (scrolled) position of the lower border of the highlighted row against the height of the enclosing div, and scrolling the div contents if it's not visible? You'd only have to do it on first highlighting a row: if it scrolls out of view later that's ok.
I've not explored the insides of roundcube very much - RC was the thing that finally persuaded me to install php, but that was only this week :) - but I'd be very happy to implement this if you like. It would be a useful way to get acquainted.
best,
will
Just checked in changes to the CVS to allow navigating with arrow keys, including holding down the shift key or the control-shift key. I did not implement using the arrow keys while holding down only the control key, as all it should do in such a situation is change the focus of the selection without actually highlighting the row. In order for that to be practical we would need another class in the css file to indicate the row that has the focus. Technically that class/style should be written anyway to indicate where the focus is. It's a pretty small detail.
The next step could be to add more keyboard shortcuts like delete key.
I'm going to take a little break from that portion of the code for the
time being but others are welcome to it. The important thing is this peice:
this.use_arrow_keys = function(e, msg_list_frame) { if (this.in_message_list != true) return true;
The in_message_list is set to true whenever one clicks anywhere on the message list (inside the div that contains the table - so that includes the scrollbar) and it's set to false whenever anyone clicks anywhere else. Basically we don't want to change the behavior of keys all the time, only when they are selecting messages.
-Charles