Opened 11 years ago
Closed 11 years ago
#27309 closed defect (bug) (fixed)
Fix the "Link" button's disabled state
Reported by: | azaozz | Owned by: | 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)
Change History (9)
#3
@
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:
↓ 5
@
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
@
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:
↓ 7
@
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
@
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.
Related: #27305