[GH-ISSUE #300] message selection on quarantine page not detecting change in shift status #285

Closed
opened 2026-02-27 11:10:59 +03:00 by kerem · 5 comments
Owner

Originally created by @tonioo on GitHub (Dec 4, 2013).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/300

Originally assigned to: @tonioo on GitHub.

Originally created by Louis-Dominique Dubeau on 2012-09-04T00:53:57Z

Modoboa version: 0.9.2
Firefox version: 14.0.1

Steps to reproduce:

  1. Wait until you have at least 5 message on your quarantine page. (Obviously, one or two message won't be enough to show the problem. 5 is a safe number to avoid borderline conditions.)
  2. Click the first message.
  3. Hold shift and click the last message. At this point, all message are selected.
  4. Release shift. Click the middle message.

Actual result: All messages above the middle message are selected. That is, the list behaves as if shift were still pressed.

Expected results: The only thing selected after step 4 should be the message you clicked on.

Observations: I am not sure what is going on but I put breakpoints on the keyup and keydown methods in jquery.htmltable.js and found that while keydown is executed, keyup is not. So it seems that the shift_pressed variable is not reset when shift is released.

Originally created by @tonioo on GitHub (Dec 4, 2013). Original GitHub issue: https://github.com/modoboa/modoboa/issues/300 Originally assigned to: @tonioo on GitHub. **Originally created by Louis-Dominique Dubeau on 2012-09-04T00:53:57Z** Modoboa version: 0.9.2 Firefox version: 14.0.1 Steps to reproduce: 1. Wait until you have at least 5 message on your quarantine page. (Obviously, one or two message won't be enough to show the problem. 5 is a safe number to avoid borderline conditions.) 2. Click the first message. 3. Hold shift and click the last message. At this point, all message are selected. 4. Release shift. Click the middle message. Actual result: All messages above the middle message are selected. That is, the list behaves as if shift were _still_ pressed. Expected results: The only thing selected after step 4 should be the message you clicked on. Observations: I am not sure what is going on but I put breakpoints on the keyup and keydown methods in jquery.htmltable.js and found that while keydown is executed, keyup is not. So it seems that the shift_pressed variable is not reset when shift is released.
kerem 2026-02-27 11:10:59 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@tonioo commented on GitHub (Dec 4, 2013):

Posted by Antoine Nguyen on 2012-09-04T19:46:31Z

Hi,

actually this behaviour is intentional... I know this is not common but if I don't implement it like that, you can't unselect all messages, you still remain with at least one selected message.

This issue could be solved by adding checkboxes in front of each message to allow the selection... (like Gmail for example).

Am I clear?

Antoine

<!-- gh-comment-id:29815757 --> @tonioo commented on GitHub (Dec 4, 2013): **Posted by Antoine Nguyen on 2012-09-04T19:46:31Z** Hi, actually this behaviour is intentional... I know this is not common but if I don't implement it like that, you can't unselect all messages, you still remain with at least one selected message. This _issue_ could be solved by adding checkboxes in front of each message to allow the selection... (like Gmail for example). Am I clear? Antoine
Author
Owner

@tonioo commented on GitHub (Dec 4, 2013):

Posted by Louis-Dominique Dubeau on 2012-09-04T21:02:38Z

Antoine,

I understand what you are saying but the problem is that the selection behavior demonstrated in Modoboa is confusing. The following page gives a good example of how multiple selection normally work. I believe it behaves the same on Linux, OS X and Windows but I could be wrong because I use Windows only rarely and almost never use OS X.

http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select_multiple

On that page here is the behavior I see in Firefox 15.0 on Ubuntu 12.04.1:

  1. Click the first item, hold shift and then click the last item: all items will be selected.
  2. Release shift, and then click on any single item: the selection will be changed to the item you clicked on.
  3. Ok so what if you want to have nothing selected? Hold ctrl, and click again on the selected item. Now nothing is selected.

A check box on the side would indeed be a welcome addition. For one thing it would make it easier to know when an item is selected. I find myself having a hard time knowing at a glance what it is I have selected because the grey background of selected items is rather subtle. Another nice addition would be some function at the top of the list to select or unselect all items.

Thanks,
Louis

<!-- gh-comment-id:29815761 --> @tonioo commented on GitHub (Dec 4, 2013): **Posted by Louis-Dominique Dubeau on 2012-09-04T21:02:38Z** Antoine, I understand what you are saying but the problem is that the selection behavior demonstrated in Modoboa is confusing. The following page gives a good example of how multiple selection normally work. I believe it behaves the same on Linux, OS X and Windows but I could be wrong because I use Windows only rarely and almost never use OS X. http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select_multiple On that page here is the behavior I see in Firefox 15.0 on Ubuntu 12.04.1: 1. Click the first item, hold shift and then click the last item: all items will be selected. 2. Release shift, and then click on any single item: the selection will be changed to the item you clicked on. 3. Ok so what if you want to have nothing selected? Hold ctrl, and click again on the selected item. Now nothing is selected. A check box on the side would indeed be a welcome addition. For one thing it would make it easier to know when an item is selected. I find myself having a hard time knowing at a glance what it is I have selected because the grey background of selected items is rather subtle. Another nice addition would be some function at the top of the list to select or unselect all items. Thanks, Louis
Author
Owner

@tonioo commented on GitHub (Dec 4, 2013):

Posted by Antoine Nguyen on 2012-09-05T07:38:00Z

Louis-Dominique Dubeau wrote:

Antoine,

I understand what you are saying but the problem is that the selection behavior demonstrated in Modoboa is confusing. The following page gives a good example of how multiple selection normally work. I believe it behaves the same on Linux, OS X and Windows but I could be wrong because I use Windows only rarely and almost never use OS X.

http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select_multiple

On that page here is the behavior I see in Firefox 15.0 on Ubuntu 12.04.1:

  1. Click the first item, hold shift and then click the last item: all items will be selected.
  2. Release shift, and then click on any single item: the selection will be changed to the item you clicked on.
  3. Ok so what if you want to have nothing selected? Hold ctrl, and click again on the selected item. Now nothing is selected.

I'll implement this common mechanism soon.

A check box on the side would indeed be a welcome addition. For one thing it would make it easier to know when an item is selected. I find myself having a hard time knowing at a glance what it is I have selected because the grey background of selected items is rather subtle. Another nice addition would be some function at the top of the list to select or unselect all items.

In addition to the checkbox, I'll use the simple click event to open a given message. No more double click.

Your proposal about a way to select/unselect all messages is also a good one. Maybe I could add an entry into the Content class menu?

<!-- gh-comment-id:29815762 --> @tonioo commented on GitHub (Dec 4, 2013): **Posted by Antoine Nguyen on 2012-09-05T07:38:00Z** Louis-Dominique Dubeau wrote: > Antoine, > > I understand what you are saying but the problem is that the selection behavior demonstrated in Modoboa is confusing. The following page gives a good example of how multiple selection normally work. I believe it behaves the same on Linux, OS X and Windows but I could be wrong because I use Windows only rarely and almost never use OS X. > > http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select_multiple > > On that page here is the behavior I see in Firefox 15.0 on Ubuntu 12.04.1: > 1. Click the first item, hold shift and then click the last item: all items will be selected. > 2. Release shift, and then click on any single item: the selection will be changed to the item you clicked on. > 3. Ok so what if you want to have nothing selected? Hold ctrl, and click again on the selected item. Now nothing is selected. I'll implement this common mechanism soon. > A check box on the side would indeed be a welcome addition. For one thing it would make it easier to know when an item is selected. I find myself having a hard time knowing at a glance what it is I have selected because the grey background of selected items is rather subtle. Another nice addition would be some function at the top of the list to select or unselect all items. In addition to the checkbox, I'll use the _simple click_ event to open a given message. No more _double click_. Your proposal about a way to select/unselect all messages is also a good one. Maybe I could add an entry into the _Content class_ menu?
Author
Owner

@tonioo commented on GitHub (Dec 4, 2013):

Posted by Louis-Dominique Dubeau on 2012-09-05T12:41:27Z

Antoine Nguyen wrote:

In addition to the checkbox, I'll use the simple click event to open a given message. No more double click.

Great!

Your proposal about a way to select/unselect all messages is also a good one. Maybe I could add an entry into the Content class menu?

Ah... you know what? I did not understand what the "Content Class" menu was supposed to do. I tried it before but I just did not get it. Maybe I had already selected everything and thus I failed to change anything when I selected "Spam" in that menu. I thought it worked like the search field next to it. That is, it would display only those messages that are of the chosen class. Now I realize after trying it again that it affect selection. I would rename "Content Class" something like "Select..." There's already a "Nothing" item which should be changed to "None". (Although "Nothing" is not impossible, it does not seem to me as idiomatic as "None", as in "none of the items in the list".) An "All" item could be added for selecting everything.

In the long run, I think a model for inspiration regarding user management of the quarantine is Maia Mailguard. I've used it for many years but I recently changed hosting companies, and decided Maia had downsides I did not want to live with (namely, it has its own special amavis daemon). I mean to open a feature request here regarding the idea of taking inspiration from Maia but have not done so yet.

Thanks,
Louis

<!-- gh-comment-id:29815763 --> @tonioo commented on GitHub (Dec 4, 2013): **Posted by Louis-Dominique Dubeau on 2012-09-05T12:41:27Z** Antoine Nguyen wrote: > In addition to the checkbox, I'll use the _simple click_ event to open a given message. No more _double click_. Great! > Your proposal about a way to select/unselect all messages is also a good one. Maybe I could add an entry into the _Content class_ menu? Ah... you know what? I did not understand what the "Content Class" menu was supposed to do. I tried it before but I just did not get it. Maybe I had already selected everything and thus I failed to change anything when I selected "Spam" in that menu. I thought it worked like the search field next to it. That is, it would display only those messages that are of the chosen class. Now I realize after trying it again that it affect selection. I would rename "Content Class" something like "Select..." There's already a "Nothing" item which should be changed to "None". (Although "Nothing" is not impossible, it does not seem to me as idiomatic as "None", as in "none of the items in the list".) An "All" item could be added for selecting everything. In the long run, I think a model for inspiration regarding user management of the quarantine is Maia Mailguard. I've used it for many years but I recently changed hosting companies, and decided Maia had downsides I did not want to live with (namely, it has its own special amavis daemon). I mean to open a feature request here regarding the idea of taking inspiration from Maia but have not done so yet. Thanks, Louis
Author
Owner

@tonioo commented on GitHub (Dec 4, 2013):

Posted by Antoine Nguyen on 2012-09-05T14:43:19Z

Louis-Dominique Dubeau wrote:

Ah... you know what? I did not understand what the "Content Class" menu was supposed to do. I tried it before but I just did not get it. Maybe I had already selected everything and thus I failed to change anything when I selected "Spam" in that menu. I thought it worked like the search field next to it. That is, it would display only those messages that are of the chosen class. Now I realize after trying it again that it affect selection. I would rename "Content Class" something like "Select..." There's already a "Nothing" item which should be changed to "None". (Although "Nothing" is not impossible, it does not seem to me as idiomatic as "None", as in "none of the items in the list".) An "All" item could be added for selecting everything.

Yes, None would be better (and so All becomes logical). Now that you say it, I realize the Content Class menu is not really clear for a new user... I could update the label to something like Content class selection but it might be too long (in french for example). I guess a little icon (representing a checkbox) could be clear enough, what do you think?

In the long run, I think a model for inspiration regarding user management of the quarantine is Maia Mailguard. I've used it for many years but I recently changed hosting companies, and decided Maia had downsides I did not want to live with (namely, it has its own special amavis daemon). I mean to open a feature request here regarding the idea of taking inspiration from Maia but have not done so yet.

I've never used maia but I know its limitation about amavisd. If you got ideas about how the amavis frontend could evolve, don't hesitate to share them with me ^^

Antoine

<!-- gh-comment-id:29815766 --> @tonioo commented on GitHub (Dec 4, 2013): **Posted by Antoine Nguyen on 2012-09-05T14:43:19Z** Louis-Dominique Dubeau wrote: > Ah... you know what? I did not understand what the "Content Class" menu was supposed to do. I tried it before but I just did not get it. Maybe I had already selected everything and thus I failed to change anything when I selected "Spam" in that menu. I thought it worked like the search field next to it. That is, it would display only those messages that are of the chosen class. Now I realize after trying it again that it affect selection. I would rename "Content Class" something like "Select..." There's already a "Nothing" item which should be changed to "None". (Although "Nothing" is not impossible, it does not seem to me as idiomatic as "None", as in "none of the items in the list".) An "All" item could be added for selecting everything. > > Yes, _None_ would be better (and so _All_ becomes logical). Now that you say it, I realize the _Content Class_ menu is not really clear for a new user... I could update the label to something like _Content class selection_ but it might be too long (in french for example). I guess a little icon (representing a checkbox) could be clear enough, what do you think? > > In the long run, I think a model for inspiration regarding user management of the quarantine is Maia Mailguard. I've used it for many years but I recently changed hosting companies, and decided Maia had downsides I did not want to live with (namely, it has its own special amavis daemon). I mean to open a feature request here regarding the idea of taking inspiration from Maia but have not done so yet. > > I've never used maia but I know its limitation about amavisd. If you got ideas about how the amavis frontend could evolve, don't hesitate to share them with me ^^ Antoine
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#285
No description provided.