Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Pasting embed via Ctrl-V doesn't lead to placeholder removing when medium-editor version is bigger than 5.17.0 #418

Open
asiniy opened this issue Mar 23, 2017 · 2 comments

Comments

@asiniy
Copy link

asiniy commented Mar 23, 2017

Hello!

I found a bug. I want add embed tweet to my medium-editor and I encounter this when do it via Ctrl-V:
screenshot from 2017-03-23 11 39 26

Placeholder is going to be removed when I click on it or when I paste embed link via Right click.

It behaves well in another browsers (I tried with Chromium) as well as with earlier versions (ie 5.16.1).
I made small investigations and it looks like keyup events aren't fired on ff

I work on this issue now, will provide further details soon.

Env

  • Ubuntu 32 bit
  • Firefox 52.01 (latest right now)
  • medium-editor-insert-plugin 2.4.0
@asiniy
Copy link
Author

asiniy commented Mar 23, 2017

I added simple $(document).on('keyup', function(e) { console.log(e) }) and there are results:

In FF:

Object { originalEvent: keyup, type: "keyup", isDefaultPrevented: va(), target: <body.StickyBody.dimmable>, currentTarget: HTMLDocument → new, relatedTarget: undefined, timeStamp: 3864784, jQuery311035641412740848544: true, delegateTarget: HTMLDocument → new, handleObj: Object, 1 more… }

In chromium:

r.Event {originalEvent: KeyboardEvent, type: "keyup", target: div#medium-editor-1490263583573.TextEditor__Input.medium-editor-element.medium-editor-insert-plugin, currentTarget: document

@asiniy
Copy link
Author

asiniy commented Mar 23, 2017

If I type something, event is fired on the contenteditable, but on Ctrl-V is fired on the body...

@orthes any ideas?

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

No branches or pull requests

2 participants