Completed
Last Updated: 06 Jun 2016 10:05 by ADMIN
ADMIN
Nikolay
Created on: 10 May 2016 11:28
Category: UI for ASP.NET AJAX
Type: Bug Report
0
TrackChanges does not track typing of !, #, $, %, & characters
When the user types !, #, $, % or &, the inserted character is not tracked. These characters are typed by Shift+1, Shift+3, Shift+4, Shift+5, Shift+7 keys.

Here is a workaround:
<telerik:RadEditor ID="RadEditor1" runat="server" EnableTrackChanges="true">
	<Content>
		<p>test1</p>
		<p>test2</p>
	</Content>
</telerik:RadEditor>

<script>
	(function () {
		var shouldIgnoreKey = Telerik.Web.UI.RadEditor.prototype._shouldIgnoreKey;
		Telerik.Web.UI.RadEditor.prototype._shouldIgnoreKey = function (e) {
			if (e.shiftKey) {
				if ("code" in e && /^Digit/.test(e.code)) {
					return false;
				}
				if ("key" in e && /^Digit|!|#|\$|%|&/.test(e.key)) {
					return false;
				}
				if (Telerik.Web.Browser.ie && e.keyCode >= 33 && e.keyCode <= 40) {//Shift+1, Shift+3, Shift+4, Shift+5, Shift+7, ...
					return false;
				}
			}
			return shouldIgnoreKey.call(this, e);
		}
	})();
</script>
0 comments