Page MenuHomePhabricator

Added option to toolbar-item to switch off text-selection
Closed, DeclinedPublic

Description

Author: carsten

Description:
Patch for automatic-selection-enhancement

A client of mine was a bit annoyed by the editor:
Every time he inserted - lets say - an image, the default contents of the image-fields "thumbs|width|caption...." were automatically marked/selected. So with a tip on the keyboard all "helping" text was gone.

I added an option to the toolbar-items to optional deactivate this behaviour.

Patch attached.


Version: unspecified
Severity: enhancement

attachment editor-selection.patch ignored as obsolete

Details

Reference
bz27447

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:19 PM
bzimport set Reference to bz27447.
bzimport added a subscriber: Unknown Object (MLST).

carsten wrote:

Patch for automatic-selection-enhancement

corrected patch

Attached:

argh, keep getting these commit revisions wrong. r82308.

There is currently a FIXME on the code with this comment:

Notice: Undefined index: select in /home/reedy/mediawiki/trunk/phase3/includes/EditPage.php on line 2390

MediaWiki is expected to run without warnings under E_STRICT. Can you update your patch?

If you'd like to make more contributions to MediaWiki, I recommend you ask for commit privs.

carsten wrote:

Update to previous patch to get rid of php-warning

I've only added a diff to the previous patch as this patch has already been committed as far I can see?

Attached:

(In reply to comment #0)

Every time he inserted - lets say - an image, the default contents of the
image-fields "thumbs|width|caption...." were automatically marked/selected. So
with a tip on the keyboard all "helping" text was gone.

Ctrl+Z should bring it right back.

Indeed this seems like an undesirable change to make on the default buttons which are *exactly* intended to produce sample text that's selected so your typing removes it.

Further, r82343 was never actually functional to begin with... It's been reverted in r92715.

The r82308 changes are still in, so you can pass the extra parameter on the JS side for your custom toolbar items, but the old classic toolbar is being phased out for WikiEditor anyway.