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

Fix #1098 - editablePaste not triggering on keyboard paste #1099

Merged
merged 4 commits into from
May 27, 2016

Conversation

nmielnik
Copy link
Member

Q A
Bug fix? yes
New feature? no
BC breaks? potentially
Deprecations? no
New tests added? yes
Fixed tickets #1098
License MIT

Description

The new paste handling code injects a temporary element to capture keyboard pastes. By introducing this new element, which is not part of the editor element, it prevented the paste event from being triggered on the editor, which would mean the editablePaste event also would not be triggered.

The fix was to manually trigger the editablePaste event whenever keyboard paste occurs.

Since some of this triggering happens within a setTimeout() after the paste event, we won't always have a valid event object to use when manually triggering editablePaste. So, to ensure everything works consistently in all cases, the editablePaste event was modified everywhere to trigger with a fake-event object which only has the currentTarget and target properties.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 94.89% when pulling 8bd8f8f on editable-paste-fix into 0820080 on master.

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

Successfully merging this pull request may close these issues.

None yet

3 participants