Skip to content
Snippets Groups Projects
Commit f3f7bd9f authored by Christophe Matthieu's avatar Christophe Matthieu
Browse files

[FIX] web_editor: help the user to edit the link

User can't edit the first and last chars of a link (same issue for a lot of editors), and users don't want to click on edit link button in the editor bar.
When the user click (not if the user use arrow) on a link the link is activate with a content editable true and can edit the first and last chars.

opw: 654280
parent 8e81abfe
No related branches found
No related tags found
No related merge requests found
......@@ -508,6 +508,16 @@ var RTE = Widget.extend({
var $target = $(event.target);
var $editable = $target.closest('.o_editable');
if ($target.is('a')) {
$target.attr('contenteditable', true);
setTimeout(function () {
$editable.attr('contenteditable', false);
});
} else if ($editable.attr('contenteditable') === 'false') {
$target.removeAttr('contenteditable');
$editable.attr('contenteditable', true);
}
if (!$editable.size()) {
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment