Bug 469867

Summary: Cannot use arrow keys to move between cards in the main ESC screen
Product: Red Hat Enterprise Linux 6 Reporter: Suzanne Hillman <shillman>
Component: escAssignee: Jack Magne <jmagne>
Status: CLOSED CURRENTRELEASE QA Contact: Chandrasekar Kannan <ckannan>
Severity: low Docs Contact:
Priority: low    
Version: 6.0CC: aakkiang, benl, ckannan, kwirth, mharmsen, ohegarty, rrelyea, shaines, syeghiay
Target Milestone: rcKeywords: Desktop
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: esc-1.1.0-19.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-02 19:04:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Proposed fix to this issue. none

Description Suzanne Hillman 2008-11-04 15:20:07 UTC
Description of problem:
Cannot use arrow keys to move between cards in the main ESC screen. If you are highlighted on the top card, then try to move down with an arrow key to the next one, the top one remains highlighted and the other one does not.

Version-Release number of selected component (if applicable):
1.0.0-37.el5

How reproducible:
Always

Steps to Reproduce:
1. Have a smartcard inserted, and click on it.
2. Insert another one, and try to use arrow keys to move down to it.
  
Actual results:
Doesn't work

Expected results:
Should highlight the one you moved to!

Additional info:
Not a regression, likely; don't think I tried it before.

Comment 3 Chandrasekar Kannan 2009-08-05 19:23:17 UTC
per smart card login team bug council, pushing to rhel6

Comment 4 Jack Magne 2010-01-22 22:51:25 UTC
Created attachment 386252 [details]
Proposed fix to this issue.

Comment 5 Jack Magne 2010-01-22 23:57:59 UTC
How To Test:


1. Start ESC.

2. Load 2 or more tokens into the computer and not the three lines in the listbox in the middle of the display, one for each token.

3. Use the tab key to negotiate to the the listbox containing the keys.

4. Use the up and down arrow keys and note that the current token selection changes each time. Also note that the previously highlighted token is no longer highlighted.

5. Try the above with one key to make sure that nothing strange happens.

6. Do the same for the case where there are no keys present.

7. Make sure that the tabbing functionality between the other buttons and controls still works as expected.

Comment 6 Matthew Harmsen 2010-01-28 18:30:32 UTC
attachment (id=386252) +mharmsen

Comment 7 Jack Magne 2010-01-28 19:27:54 UTC
/cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/ESC.js,v  <--  ESC.js
new revision: 1.27; previous revision: 1.26
done

Comment 8 Jack Magne 2010-01-28 21:40:37 UTC
Fix in esc-1.1.0-14.el6.

Comment 11 Jack Magne 2010-03-12 03:05:23 UTC
Quick patch to fix this: Last line also resolves https://bugzilla.redhat.com/show_bug.cgi?id=556657

diff -r1.28 ESC.js
1812a1813
>   list.selectItem(gCurrentSelectedRow);
1817c1818
<     olditem = list.getItemAtIndex(0);    
---
>     olditem = list.getItemAtIndex(0);
1828c1829
<   } 
---
>   }
1840c1841
<       if(newitem)
---
>       if(newitem) 
2398a2400
>                DisableItem(menu_enroll);

Comment 12 Matthew Harmsen 2010-03-15 18:40:18 UTC
Comment #11:  +mharmsen

Comment 13 Jack Magne 2010-03-15 20:52:00 UTC
cvs commit -m "Further fix for #469867 - Cannot use arrow keys to move between cards in the main ESC screen."
cvs commit: Examining .
Enter passphrase for key '/home/jmagne/.ssh/id_rsa': 
Checking in ESC.js;
/cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/ESC.js,v  <--  ESC.js
new revision: 1.29; previous revision: 1.28
done
Running syncmail...
Mailing relnotes...
...syncmail done.
Running syncmail...
Mailing cvsdirsec...
...syncmail done.

Comment 19 Jack Magne 2010-03-30 19:04:25 UTC
Proposed simple fix for the minor issue in the last statement.

diff -up ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix13 ./esc/src/app/xul/esc/chrome/content/esc/ESC.js
--- ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix13       2010-03-30 11:47:05.869207316 -0700
+++ ./esc/src/app/xul/esc/chrome/content/esc/ESC.js     2010-03-30 11:47:34.344515684 -0700
@@ -1862,6 +1862,8 @@ function InitializeAdminBindingList()

  window.setTimeout('ShowWindow()',250);

+ list.focus();
+
 }

 //Window related functions

Comment 20 Matthew Harmsen 2010-03-30 20:47:17 UTC
Comment #19 +mharmsen

Comment 21 Jack Magne 2010-03-30 20:51:00 UTC
cvs commit -m "Simple refinement to fix of #469867, Cannot use arrow keys to move between cards in the main ESC screen." ESC.js

Checking in ESC.js;
/cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/ESC.js,v  <--  ESC.js
new revision: 1.31; previous revision: 1.30
done
Running syncmail...
Mailing relnotes...
...syncmail done.
Running syncmail...
Mailing cvsdirsec...
...syncmail done.

Comment 24 Jack Magne 2010-04-06 22:16:20 UTC
Another refinement to this fix:

diff -up ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix14 ./esc/src/app/xul/esc/chrome/content/esc/ESC.js
--- ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix14       2010-04-06 14:44:43.957811579 -0700
+++ ./esc/src/app/xul/esc/chrome/content/esc/ESC.js     2010-04-06 14:45:37.633698549 -0700
@@ -1841,6 +1841,15 @@ function AdminKeyPressHandler(evt)
       if(newitem)
         newitem.click();
   }
+
+  var item = null;
+  for( i = 0; i < list.getRowCount(); i ++) {
+      item = list.getItemAtIndex(i);
+
+      if(item && item != gCurrentSelectedRow) {
+          item.setAttribute("class","UnSelectedRow");
+      }
+  }
 }

 function InitializeAdminBindingList()

Comment 25 Matthew Harmsen 2010-04-06 22:39:05 UTC
Comment #24 +mharmsen

Comment 26 Jack Magne 2010-04-06 22:58:47 UTC
Checking in ESC.js;
/cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/ESC.js,v  <--  ESC.js
new revision: 1.32; previous revision: 1.31
done
Running syncmail...
Mailing relnotes...
...syncmail done.
Running syncmail...
Mailing cvsdirsec...
...syncmail done.

Comment 27 Jack Magne 2010-04-07 00:30:15 UTC
Build 19 should address the above cosmetic issue reported when 3 keys are used.

Comment 28 Asha Akkiangady 2010-04-09 13:32:16 UTC
With esc build 19, tried moving between cards with 2 and 3 tokens, it works fine. 

Marking the bug verified.

Comment 30 releng-rhel@redhat.com 2010-07-02 19:04:06 UTC
Red Hat Enterprise Linux Beta 2 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.