Comment 2 for bug 1316949

Revision history for this message
Ivan Yelizariev (yelizariev) wrote :

I figure out the problem.

Difference between Opera and Crome at function get_selected_link of file addons/website/static/src/js/website.editor.js

    function get_selected_link(editor) {
        var sel = editor.getSelection(),
            el = sel.getSelectedElement();

At chrome:
el is null

At Opera:
el is not null

My suggestion is to use getStartElement of CKEDITOR:

    function get_selected_link(editor) {
        var sel = editor.getSelection(),
            el = sel.getSelectedElement();
+ el = el || sel.getStartElement();