Opened 10 years ago

Last modified 4 years ago

#1149 confirmed New Feature

Add default action on face for Panel button (menu button)

Reported by: mjk Owned by:
Priority: Normal Milestone:
Component: UI : Toolbar Version: 3.0
Keywords: Cc:


It's common for toolbar buttons in other applications to do a default action if you click on the button face, and only drop a panel (as FCKToolbarPanelButton does) when you click the arrow -- if there is one. At present, FCKToolbarPanelButton doesn't maintain the distinction between dropping down the panel and making a default action.

Enclosed is a patch to enable ToolbarPanelButton to pass to the toolbar command object whether or not the user clicked the dropdown arrow or the face, so that the command object can behave accordingly. This also adds the ability for ToolbarPanelButton to be context-sensitive -- necessary if you're implementing things like UL and OL.

Also enclosed is a plugin that uses the patched functionality. The plugin overloads FCKTextColorCommand so that the last color you used is the default action on the button face. It also adds DropOL, DropUL, and DropFontSize to use the same functionality to provide dropdowns for setting your OL/UL styles and font sizes.

In local testing, the patches to ToolbarPanelButton are sufficiently encapsulated so as not to break existing ToolbarPanelButtons.

Attachments (1) (3.7 KB) - added by mjk 10 years ago.
Trunk patch and plugin

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by mjk

Trunk patch and plugin

comment:1 Changed 10 years ago by mjk

  • Keywords Review? added

comment:2 Changed 9 years ago by fredck

  • Keywords HasPatch added; Review? removed

It is nice to hear you again mjk.

We have introduced a new workflow for tickets handling, patches proposal and review. I'm correcting the Keywords in this ticket to reflect our new standards.

comment:3 Changed 6 years ago by wwalc

  • Version set to FCKeditor 2.5

comment:4 Changed 4 years ago by j.swiderski

  • Keywords HasPatch removed
  • Status changed from new to confirmed
  • Summary changed from Add default action on face for FCKToolbarPanelButton + plugin for alternate OL/UL/color/size buttons to Add default action on face for Panel button (menu button)
  • Version changed from FCKeditor 2.5 to 3.0

Currently we have 3 menu buttons - SCAYT, color and background color. Default actions could be enable scayt and set default color (auto).

There are two things I'm concerned:

  1. Currently the arrow is very little and very close to button thus I don't think users will want to aim it. This will probably bring frustration among some users as it would become very hard to get to menu.
  2. As pointed out by @Rainmar there might be some accessibility issues.

To implement such feature probably new Menu button would have to be introduced. Nevertheless I'm confirming it as it might be implemented in the future.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy