Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#27309 closed defect (bug) (fixed)

Fix the "Link" button's disabled state

Reported by: azaozz's profile azaozz Owned by: azaozz's profile azaozz
Milestone: 3.9 Priority: normal
Severity: normal Version: 3.9
Component: TinyMCE Keywords: ux-feedback
Focuses: Cc:

Description

The behavior of the link dialog in TinyMCE 4.0 has changed. Now it is possible to open it without selecting text or image. Then the dialog has another field where the linked text can be added, example.

As a result the "link" button is not set to disabled. This is confusing as links cannot be added with the wpLink dialog without selecting text or image.

Attachments (1)

Screen Shot 2014-03-07 at 12.25.28.png (7.6 KB) - added by iseulde 11 years ago.

Download all attachments as: .zip

Change History (9)

#2 @azaozz
11 years ago

In 27447:

TinyMCE:

  • Restore the "link" button state to disabled by default and enabled when text or image is selected.
  • Remove the (recently added) default link plugin, not needed for wpLink.

See #27309

#3 @azaozz
11 years ago

Leaving open for considering if wpLink should be updated to offer the same workflow as the default link plugin.

#4 follow-up: @iseulde
11 years ago

Now the link button is disabled when you don't select text, but the unlink button is still active when the cursor is not inside a link.

#5 in reply to: ↑ 4 @azaozz
11 years ago

Replying to avryl:

...the unlink button is still active when the cursor is not inside a link.

This is the same as in 3.8. Can easily be set to disabled when the caret is not in a link. The problem is the Unlink button has only two states: can remove | cannot remove. Trying to match that to disabled | enabled | highlighted wouldn't work :)

It's a bit more problematic to enable it when there is a selected text and part of that text is in a link. Then clicking Unlink removes the partially selected link. Can try to patch it so it looks inside selected text when it spans more than one node and set it to 'enabled'. Will still be somewhat inconsistent, if it can remove a link it should be highlighted?

#6 follow-up: @iseulde
11 years ago

It just looks really weird when your cursor is not inside a link and there is nothing to unlink (and the link button isn't active, but the unlink button is).

#7 in reply to: ↑ 6 @nacin
11 years ago

Replying to avryl:

It just looks really weird when your cursor is not inside a link and there is nothing to unlink (and the link button isn't active, but the unlink button is).

I agree.

I recall us discussing in IRC that it should only be "active" when your cursor is in a link, or your selection contains one or more links.

#8 @azaozz
11 years ago

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

In 27934:

TinyMCE: improve setting disabled/enabled/activated states on the Unlink button, fixes #27309

Note: See TracTickets for help on using tickets.