Completed
Last Updated: 27 Apr 2015 10:42 by MailUp Dev
ADMIN
Misho
Created on: 12 Apr 2013 09:23
Category: Editor
Type: Feature Request
6
FIX: Buttons in the content area to become selectable in Chrome
Feature request for implementing an improvement related to the current impossibility to select form elements like buttons in RadEditor content area. This is a browser behavior and it is currently preventing form editing element's properties in the module manager.
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
2 comments
MailUp Dev
Posted on: 27 Apr 2015 10:42
I have tested Q1 2015 SP1 release but the problem is only partially fixed. Pressing the button with left-click, the properties view appears but the action of the form is always performed using Chrome (42.0.2311.90 m). The right-click is fine.
ADMIN
Misho
Posted on: 22 Jan 2015 13:07
The issue is resolved and the fix will be available in Q1 2015.

The following workaround could be used as a temporary solution:

<telerik:RadEditor ID="RadEditor1" runat="server" OnClientLoad="OnClientLoad">
<Content>
text <input type="button" value="button1"></input> text<br />
text <input type="button" value="button2"></input> text<br />
text <input type="submit" value="button3"></input> text
</Content>
</telerik:RadEditor>

<script type="text/javascript">
function OnClientLoad(editor, args) {
var isIE11 = $telerik.isIE10Mode && !$telerik.isIE10;
if ($telerik.isFirefox || $telerik.isSafari || isIE11) {
var $E = Telerik.Web.UI.Editor;
var eventType = $telerik.isFirefox || isIE11 ? "mousedown" : "mouseup";
$telerik.$(editor.get_contentArea()).on(eventType, "input:button", function (e) {
var range = new $E.DomRange(getBrowserRange(editor));
range.selectNode(e.target);
range.select();
});
}
}

function getBrowserRange(editor) {
var selection = editor.getSelection();
var range = selection.getRange(true);
if (!range) {
editor.setFocus();
range = selection.getRange(true);
}
return range;
}
</script>