Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

order of lines inversed on paste #168

Open
pat123456 opened this issue Aug 5, 2015 · 5 comments
Open

order of lines inversed on paste #168

pat123456 opened this issue Aug 5, 2015 · 5 comments

Comments

@pat123456
Copy link

Hello,

when copy a text, for example this one :
a
b
c

and paste it, it became :
c
b
a

@pat123456
Copy link
Author

this seem to resolve the problem ?, but don't know if it will have some bad repercussions in the rest of the code :
(in Medium.Injector.prototype line 1732 )

    if (isConverted) {
        //make an array of elements that are about to be inserted, can't use html because they will
        while (i < html.length) {
            nodes.push(html[i]);
            i++;
        }
        /*while (html.length > 0) {
            console.log(html[html.length - 1])
            parent.insertBefore(html[html.length - 1], wedge);
        }*/
        for (var j=0; j<nodes.length ;j++) {
            parent.insertBefore(nodes[j], wedge);
        }
    }

@pat123456
Copy link
Author

sorry, didn't saw that the bug was already reported in the "closed issues"
#133
but the code doesn't seem to have been changed in the official medium.js file and in the doc page ?
http://jakiestfu.github.io/Medium.js/docs/

@jasoncavett
Copy link

jasoncavett commented Jun 8, 2016

@pat123456 I believe this specific bug is still open. Bug #133 (which I just ran into) was causing the ability to paste to not work at all. (I saw this in release 1.0.1.)

I am still seeing this specific issue with copy and paste reversing the order.

Edit: Nevermind. I see you are referencing f8abd15 within that chain. My mistake. I'm going to take a look at that now.

@vhmth
Copy link

vhmth commented Nov 14, 2016

I am seeing this issue when inserting HTML as well via insertHTML('<ul><li></li></ul>');.

@vhmth
Copy link

vhmth commented Nov 14, 2016

#203

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants