Changeset 5221 in subversion


Ignore:
Timestamp:
Sep 15, 2011 2:57:35 PM (20 months ago)
Author:
alec
Message:
  • Disable message list keypress operations when CTRL key is pressed, to workaround FF6 issue, where Ctrl+Pg(Up/Down?) was changing list page and browser tab)
  • Fix multiselection with Ctrl+Up/Down? keys
Location:
trunk/roundcubemail/program/js
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/js/app.js

    r5200 r5221  
    8787 
    8888    this.buttons[command].push(button_prop); 
    89      
     89 
    9090    if (this.loaded) 
    9191      init_button(command, button_prop); 
     
    15231523  this.msglist_keypress = function(list) 
    15241524  { 
     1525    if (list.modkey == CONTROL_KEY) 
     1526      return; 
     1527 
    15251528    if (list.key_pressed == list.ENTER_KEY) 
    15261529      this.command('show'); 
    1527     else if (list.key_pressed == list.DELETE_KEY) 
    1528       this.command('delete'); 
    1529     else if (list.key_pressed == list.BACKSPACE_KEY) 
     1530    else if (list.key_pressed == list.DELETE_KEY || list.key_pressed == list.BACKSPACE_KEY) 
    15301531      this.command('delete'); 
    15311532    else if (list.key_pressed == 33) 
     
    24972498    else { 
    24982499      // if shift was pressed delete it immediately 
    2499       if (list && list.shiftkey) { 
     2500      if (list && list.modkey == SHIFT_KEY) { 
    25002501        if (confirm(this.get_label('deletemessagesconfirm'))) 
    25012502          this.permanently_remove_messages(); 
  • trunk/roundcubemail/program/js/common.js

    r5006 r5221  
    172172  e = e || window.event; 
    173173 
    174   if (bw.mac && e) { 
     174  if (bw.mac && e) 
    175175    opcode += (e.metaKey && CONTROL_KEY) + (e.shiftKey && SHIFT_KEY); 
    176     return opcode; 
    177   } 
    178   if (e) { 
     176  else if (e) 
    179177    opcode += (e.ctrlKey && CONTROL_KEY) + (e.shiftKey && SHIFT_KEY); 
    180     return opcode; 
    181   } 
     178 
     179  return opcode; 
    182180}, 
    183181 
  • trunk/roundcubemail/program/js/list.js

    r4750 r5221  
    3737 
    3838  this.subject_col = -1; 
    39   this.shiftkey = false; 
     39  this.modkey = 0; 
    4040  this.multiselect = false; 
    4141  this.multiexpand = false; 
     
    649649        if (!with_mouse) 
    650650          this.highlight_row(id, true); 
    651         break;  
     651        break; 
    652652 
    653653      case CONTROL_SHIFT_KEY: 
     
    963963  switch (keyCode) { 
    964964    case 40: 
    965     case 38:  
     965    case 38: 
    966966    case 63233: // "down", in safari keypress 
    967967    case 63232: // "up", in safari keypress 
     
    977977      var ret = this.use_plusminus_key(keyCode, mod_key); 
    978978      this.key_pressed = keyCode; 
     979      this.modkey = mod_key; 
    979980      this.triggerEvent('keypress'); 
     981      this.modkey = 0; 
    980982      return ret; 
    981983    case 36: // Home 
     
    986988      return rcube_event.cancel(e); 
    987989    default: 
    988       this.shiftkey = e.shiftKey; 
    989990      this.key_pressed = keyCode; 
     991      this.modkey = mod_key; 
    990992      this.triggerEvent('keypress'); 
    991       // reset shiftkey flag, we need it only for registered events 
    992       this.shiftkey = false; 
     993      this.modkey = 0; 
    993994 
    994995      if (this.key_pressed == this.BACKSPACE_KEY) 
     
    10451046 
    10461047  if (new_row) { 
    1047     this.select_row(new_row.uid, mod_key, true); 
     1048    this.select_row(new_row.uid, mod_key, false); 
    10481049    this.scrollto(new_row.uid); 
    10491050  } 
Note: See TracChangeset for help on using the changeset viewer.