Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#28921 closed defect (bug) (fixed)

link button remains disabled when using wp_editor in front end since r29183

Reported by: imath's profile imath Owned by: azaozz's profile azaozz
Milestone: 4.0 Priority: normal
Severity: normal Version: 4.0
Component: TinyMCE Keywords:
Focuses: Cc:

Description

Since r29183, when using the wp_editor in front end the link/unlink buttons remains disabled even if some text is selected.

It seems to be caused by the check used to set the getView function at line 19 of the plugin.js file

Using the attached patch seems to solve the trouble.

Attachments (1)

28921.diff (1.1 KB) - added by imath 10 years ago.

Download all attachments as: .zip

Change History (6)

@imath
10 years ago

#1 @azaozz
10 years ago

Ah, I see where this is coming from: if the window.wp.mce is not loaded the wpview plugin returns early and doesn't expose any methods. We can check if editor.plugins.wpview.getView exists but probably better to have a noop() for it.

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

#2 @azaozz
10 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 29190:

TinyMCE wpView: add noop() when returning early, fixes #28921

#3 @azaozz
10 years ago

  • Milestone changed from Awaiting Review to 4.0

#4 follow-up: @imath
10 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Hi,

i confirm r29190 fixed the problem. But i'm reopening this ticket to let you know that since r29203, when you select some text, the link / unlink button remain disabled on front end and in back end. To make them available you now need to (for instance) first click on the 'bold' button. It looks like selecting the text is no more refreshing the link button state.

#5 in reply to: ↑ 4 @SergeyBiryukov
10 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Replying to imath:

But i'm reopening this ticket to let you know that since r29203, when you select some text, the link / unlink button remain disabled on front end and in back end.

Fixed in [29211].

Note: See TracTickets for help on using tickets.