Required Information

Version(s) of Ext GWT
GXT 3.0.0

Browser versions and OS
Independant of browser/OS.

Virtual Machine
No.

Description
Imagine you have TextButtonCell as depicted on the example explorer in the first column, but with a menu attached.



So if you click anywhere on the yellow area on that sample, the button's handlers are not activated. On the other hand, if your TextButtonCell has a menu, that menu is activated if you click on the yellow area (anywhere outside the actual button in fact).

IMHO, clicking inside this yellow area should not trigger the menu, as it does not fire the button handlers if there's no menu attached.

Run mode
Development mode, and production mode.

Steps to reproduce the problem
  1. Open a grid that has a TextButtonCell with a menu.
  2. Click outside the button, on anywhere else in the cell.
Expected result
The TextButtonCell menu should not have opened.

Actual result
Menu of the TextButtonCell opened.

Test case
Code:
public class TextButtonWithMenu implements IsWidget, EntryPoint {
 
    private Plant plant1;
 
    interface PlaceProperties extends PropertyAccess<Plant> {
 
        @Path("name")
        ModelKeyProvider<Plant> key();
 
        ValueProvider<Plant, String> name();
 
    }
 
    private static final PlaceProperties properties = GWT.create(PlaceProperties.class);
    private ListStore<Plant> store;
 
    @Override
    public Widget asWidget() {
        TextButtonCell button = new TextButtonCell();
 
        Menu menu = new Menu();
        MenuItem mItem = new MenuItem();
        mItem.setHTML("OK");
 
        menu.add(mItem);
        button.setMenu(menu);
 
        ColumnConfig<Plant, String> nameColumn = new ColumnConfig<Plant, String>(properties.name(), 100, "Name");
        ColumnConfig<Plant, String> buttonColumn = new ColumnConfig<Plant, String>(properties.name(), 100, "Action");
 
        buttonColumn.setCell(button);
 
        List<ColumnConfig<Plant, ?>> l = new ArrayList<ColumnConfig<Plant, ?>>();
        l.add(nameColumn);
        l.add(buttonColumn);
        ColumnModel<Plant> cm = new ColumnModel<Plant>(l);
 
        store = new ListStore<Plant>(properties.key());
        plant1 = new Plant();
        plant1.setId(0);
        plant1.setName("Lorem");
 
        List<Plant> plants = Arrays.asList(plant1);
 
        store.addAll(plants);
 
        Grid<Plant> grid = new Grid<Plant>(store, cm);
        grid.setBorders(true);
        grid.getView().setAutoExpandColumn(nameColumn);
        grid.getView().setTrackMouseOver(false);
 
        FramedPanel cp = new FramedPanel();
        cp.setHeadingText("Cell Grid Example");
        cp.setWidget(grid);
        cp.setPixelSize(780, 410);
        cp.addStyleName("margin-10");
 
        cp.setButtonAlign(BoxLayoutContainer.BoxLayoutPack.CENTER);
 
        return cp;
    }
 
    @Override
    public void onModuleLoad() {
        RootPanel.get().add(asWidget());
    }
}
Helpful Information
Already discussed in a similar thread: http://www.sencha.com/forum/showthre...093#post837496

Screenshot or video

Clicking yellow area should not activate the TextButtonCell menu. (Screenshot of normal TextButtonCell.)


Live test
Working example TextButtonCell without menu: http://www.sencha.com/examples/#ExamplePlace:cellgrid