Make WordPress Core

Opened 7 years ago

Closed 5 years ago

#42681 closed defect (bug) (worksforme)

'Insert link' button doesn't work when updating a post and using div elements at the same time

Reported by: michellefoolen's profile michellefoolen Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9
Component: TinyMCE Keywords: reporter-feedback
Focuses: Cc:

Description (last modified by SergeyBiryukov)

When updating a post (after publishing it earlier), it's not possible to add a new link via the 'insert' link button in the visual editor, if the link is placed between<div> and </div> elements. 
 
You can reproduce this error by:

  • opening a new post
  • adding <div> </div> in the text editor *
  • press the ‘publish’ button
  • switch back to the visual editor
  • add a link via the ‘insert’ link button (for example: www.google.com)
  • switch to the text editor and notice that the result is not a link element but just: <div> http://www.google.com</div>

Actual result: <div> http://www.google.com </div>
Expected result: <div> <a href=“http://google.com”>http://google.com</a> </div>

This error didn’t happen in WordPress 4.8.2, but it does in WordPress 4.9.

*please note that from here on, everything in your editor is placed within div elements automatically. For example, just pressing the ‘enter’ button leads to new <div> </div> elements in your text editor

Change History (3)

#1 @SergeyBiryukov
7 years ago

  • Description modified (diff)

#2 @azaozz
7 years ago

  • Keywords reporter-feedback added

Hi @michellefoolen, I'm having trouble reproducing this. Adding a div with some text in the Text editor, then switching to Visual and making that text a link seems to work properly. Also tried adding an empty div, switched to Visual, typed some text and made it into a link. Same result, seems to be working properly.

Could you try in a "clean" WP install (without plugins and with one of the default themes). Also, what browser do you use? Can you try from an incognito window (so add-ons/extensions are not loaded).

#3 @azaozz
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Still unable to reproduce, also quite some time with no feedback.

Closing as worksforme. Feel free to reopen if this still needs fixing in the classic editor.

Note: See TracTickets for help on using tickets.