Check-in [b297c8220e]
Overview
SHA1:b297c8220ed6c525512773bab312b927153e1eee
Date: 2016-02-26 20:24:46
User: rkeene
Comment:ChromeOS: Updated PIN entry prompt to accept "Escape" to close it
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2016-02-26
20:30
[3956295cf1] ChromeOS: Fixed name of hashing algorithms we do support (user: rkeene, tags: trunk)
20:24
[b297c8220e] ChromeOS: Updated PIN entry prompt to accept "Escape" to close it (user: rkeene, tags: trunk)
20:00
[620c0e591e] ChromeOS: Fixed bug in debug message logic being inverted and possible undefined dereference (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);