Make WordPress Core

Opened 8 years ago

Last modified 8 years ago

#40559 new defect (bug)

Bug when inserting images with TinyMCE for latest Chrome

Reported by: dreative's profile dreative Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 4.7.4
Component: Editor Keywords:
Focuses: Cc:

Description

Environment:
Windows 8.1 64bit
Google Chrome ver 58.0.3029.81(latest)
Google Chrome Canary ver 60.0.3079.0(Official Build)canary (64bit)

Issue steps:

Preparation

test.jpg
This is a test sentence.This is a test sentence.This is a test sentence.
This is a test sentence.This is a test sentence.This is a test sentence.
This is a test sentence.This is a test sentence.This is a test sentence.

test.jpg is the name of the file to be inserted.

1)Select test.jpg with the mouse
2)Cut test.jpg with CTRL + X
3)Insert image from Add Media button

After image insertion:

<img src="test.jpg" />a test sentence.This is a test sentence.This is a test sentence.
This is a test sentence.This is a test sentence.This is a test sentence.
This is a test sentence.This is a test sentence.This is a test sentence.

The img tag interrupts the sentence behind as described above.

Please validate.

Change History (6)

#1 @azaozz
8 years ago

  • Keywords reporter-feedback added

Trying to reproduce in Chrome 58.0.3029.81 (64-bit) Win10:

Initial content is:

http://localhost/content/uploads/2017/01/IMG_20170106_141203.jpg

This is a test sentence.This is a test sentence.This is a test sentence. This is a test sentence.This is a test sentence.This is a test sentence. This is a test sentence.This is a test sentence.This is a test sentence.

After Ctrl+X (cutting) the URL, the content is:



This is a test sentence.This is a test sentence.This is a test sentence. This is a test sentence.This is a test sentence.This is a test sentence. This is a test sentence.This is a test sentence.This is a test sentence.

(Note the white space at the top. This is now an empty paragraph.)

Opening the media modal, selecting Insert from URL, pasting the URL and clicking Insert, the content (from the Text editor tab) is:

<img class="alignnone size-medium" src="http://localhost/content/uploads/2017/01/IMG_20170106_141203.jpg" width="3264" height="2448" />

This is a test sentence.This is a test sentence.This is a test sentence. This is a test sentence.This is a test sentence.This is a test sentence. This is a test sentence.This is a test sentence.This is a test sentence.

All seems to be working properly here. Perhaps I'm misunderstanding some of the steps to reproduce it.

#2 @dreative
8 years ago

http://localhost/content/uploads/2017/01/IMG_20170106_141203.jpg
This is a test sentence.This is a test sentence.This is a test sentence. This is a test sentence.This is a test sentence.This is a test sentence. This is a test sentence.This is a test sentence.This is a test sentence.

Please do not put blank lines in the above text and below text.
TinyMCE 「TEXT MODE」Please try the same action.
The phenomenon occurred in the Japanese version.
Maybe there is a possibility of multibyte problem.

#3 @azaozz
8 years ago

  • Component changed from TinyMCE to Editor
  • Keywords reporter-feedback removed
  • Milestone changed from Awaiting Review to 4.8

Ah, I see it now. This is in the Text editor (textarea), not in TinyMCE.

Can reproduce it there. Very strange... Possibly a Chrome bug? Another way to reproduce:

  1. Add some text in the Text editor. For example: This is a test sentence..
  2. Delete or cut This. Can be with backspace, forward-delete, Ctrl+X, etc. Has to be several chars long and at the very beginning.
  3. Insert something from the media modal, doesn't matter local or remote, image or video.

At this point few more chars of the initial text are removed/overwritten.

@dreative thanks for the ticket. Trying to patch.

Edit: the number of the overwritten/missing chars is the same as the number of deleted chars. Starting to look more like a Chrome bug.

Last edited 8 years ago by azaozz (previous) (diff)

#4 @dreative
8 years ago

It was reproduced.
I am glad to contact you.
Please respond properly.

This ticket was mentioned in Slack in #core by obenland. View the logs.


8 years ago

#6 @obenland
8 years ago

  • Milestone changed from 4.8 to Future Release
Note: See TracTickets for help on using tickets.