Check-in [b297c8220e]
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
40
41
42
43
44
45
46




47
48
49
50


51
52

53
54
55
56

57
58





59
60
61








62
63
		setTimeout(function() {
			if (document.activeElement.className != "button") {
				focusPin();
			}
		}, 1);
	}

	document.getElementById('pin').onkeypress = function(keyEvent) {




		if (!keyEvent) {
			return(true);
		}



		if (!keyEvent.keyIdentifier) {
			return(true);

		}

		if (keyEvent.keyIdentifier != "Enter") {
			return(true);

		}






		clickOk();

		return(false);








	};
}, 1);







|
>
>
>
>




>
>
|
<
>


|
<
>


>
>
>
>
>
|

|
>
>
>
>
>
>
>
>


39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

58
59
60
61

62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
		setTimeout(function() {
			if (document.activeElement.className != "button") {
				focusPin();
			}
		}, 1);
	}

	document.getElementById('pin').onkeypress = document.getElementById('pin').onkeyup = function(keyEvent) {
		var tryKeyPressed;
		var keyPressed;
		var idx;

		if (!keyEvent) {
			return(true);
		}

		tryKeyPressed = [];

		if (keyEvent.keyIdentifier) {

			tryKeyPressed.push(keyEvent.keyIdentifier);
		}

		if (keyEvent.code) {

			tryKeyPressed.push(keyEvent.code);
		}

		for (idx = 0; idx < tryKeyPressed.length; idx++ ) {
			keyPressed = tryKeyPressed[idx];

			switch (keyPressed) {
				case "Enter":
					clickOk();

					return(false);
				case "Escape":
					clickCancel();

					return(false);
			}
		}

		return(true);
	};
}, 1);