Page MenuHomePhabricator

Disable text manipulating buttons on read-only pages
Open, LowestPublic

Description

On read-only pages WikiEditor disables the editing of the textarea with the keyboard. The buttons for manipulating the textarea like bold are still active and change the textarea.

Expected behavior: The buttons for manipulating the textarea should be disabled on read-only pages.

Q: Anyone got ideas for how disabled buttons in WikiEditor 2010 should look ?

Event Timeline

Fomafix created this task.Mar 3 2018, 10:18 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 3 2018, 10:18 AM
TheDJ triaged this task as Lowest priority.Nov 13 2018, 1:25 PM
TheDJ added a subscriber: TheDJ.Nov 14 2018, 7:02 PM

This is only if the editor was force loaded, by something else having a dependency on it. MediaWiki-extensions-CodeMirror indeed does this. I suspect that reftoolbar might as well....

WikiEditor was never really designed for readonly pages however.

Change 473548 had a related patch set uploaded (by TheDJ; owner: TheDJ):
[mediawiki/extensions/WikiEditor@master] Toolbar: ignore modifications on readonly textarea

https://gerrit.wikimedia.org/r/473548

Jdforrester-WMF added a subscriber: Jdforrester-WMF.

With this change, the buttons are still enabled but don't work, which stops things being broken, at least. :-)

TheDJ updated the task description. (Show Details)Nov 14 2018, 8:30 PM

A simple styling for disabled buttons is

opacity: .5;

Change 473548 merged by jenkins-bot:
[mediawiki/extensions/WikiEditor@master] Toolbar: ignore modifications on readonly textarea

https://gerrit.wikimedia.org/r/473548

TheDJ added a comment.EditedNov 15 2018, 10:25 AM

A simple styling for disabled buttons is

opacity: .5;

Would look like:

Would have to apply to .tool > a, .tool-button, .tool-select .label, .wikiEditor-ui-toolbar .page-characters div span, but NOT the toggle elements.
and to all click handlers connected to those elements, nor the VE menu.

TheDJ moved this task from Backlog to Closed on the WikiEditor board.Nov 27 2018, 1:48 PM
TheDJ moved this task from Closed to Doing on the WikiEditor board.