Overview
Comment: | ChromeOS: Updated PIN entry prompt to accept "Escape" to close it |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: | b297c8220ed6c525512773bab312b927153e1eee |
User & Date: | rkeene on 2016-02-26 20:24:46 |
Other Links: | manifest | tags |
Context
2016-02-26
| ||
20:30 | ChromeOS: Fixed name of hashing algorithms we do support check-in: 3956295cf1 user: rkeene tags: trunk | |
20:24 | ChromeOS: Updated PIN entry prompt to accept "Escape" to close it check-in: b297c8220e user: rkeene tags: trunk | |
20:00 | ChromeOS: Fixed bug in debug message logic being inverted and possible undefined dereference check-in: 620c0e591e user: rkeene tags: trunk | |
Changes
Modified build/chrome/pin.js from [bd71cff546] to [b11fa27239].
39 39 setTimeout(function() { 40 40 if (document.activeElement.className != "button") { 41 41 focusPin(); 42 42 } 43 43 }, 1); 44 44 } 45 45 46 - document.getElementById('pin').onkeypress = function(keyEvent) { 46 + document.getElementById('pin').onkeypress = document.getElementById('pin').onkeyup = function(keyEvent) { 47 + var tryKeyPressed; 48 + var keyPressed; 49 + var idx; 50 + 47 51 if (!keyEvent) { 48 52 return(true); 49 53 } 50 54 51 - if (!keyEvent.keyIdentifier) { 52 - return(true); 55 + tryKeyPressed = []; 56 + 57 + if (keyEvent.keyIdentifier) { 58 + tryKeyPressed.push(keyEvent.keyIdentifier); 59 + } 60 + 61 + if (keyEvent.code) { 62 + tryKeyPressed.push(keyEvent.code); 53 63 } 54 64 55 - if (keyEvent.keyIdentifier != "Enter") { 56 - return(true); 65 + for (idx = 0; idx < tryKeyPressed.length; idx++ ) { 66 + keyPressed = tryKeyPressed[idx]; 67 + 68 + switch (keyPressed) { 69 + case "Enter": 70 + clickOk(); 71 + 72 + return(false); 73 + case "Escape": 74 + clickCancel(); 75 + 76 + return(false); 77 + } 57 78 } 58 79 59 - clickOk(); 60 - 61 - return(false); 80 + return(true); 62 81 }; 63 82 }, 1);