Skip to content

Instantly share code, notes, and snippets.

@gcorne
Created February 3, 2014 23:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gcorne/8794369 to your computer and use it in GitHub Desktop.
Save gcorne/8794369 to your computer and use it in GitHub Desktop.
diff --git src/wp-includes/js/tinymce/plugins/paste/plugin.js src/wp-includes/js/tinymce/plugins/paste/plugin.js
index 45a6e38..92b5411 100644
--- src/wp-includes/js/tinymce/plugins/paste/plugin.js
+++ src/wp-includes/js/tinymce/plugins/paste/plugin.js
@@ -313,6 +313,8 @@ define("tinymce/pasteplugin/Clipboard", [
var rects = lastRng.getClientRects();
if (rects.length) {
top = scrollTop + (rects[0].top - dom.getPos(body).y);
+ } else if ( lastRng.startContainer.offsetTop ) {
+ top = scrollTop + (lastRng.startContainer.offsetTop - dom.getPos(body).y);
}
}
@@ -1122,4 +1124,4 @@ define("tinymce/pasteplugin/Plugin", [
});
expose(["tinymce/pasteplugin/Utils","tinymce/pasteplugin/Clipboard","tinymce/pasteplugin/WordFilter","tinymce/pasteplugin/Quirks","tinymce/pasteplugin/Plugin"]);
-})(this);
\ No newline at end of file
+})(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment