Skip to content

Additional click event when resizing table header in Firefox #353

@Sebastian-Habenicht

Description

@Sebastian-Habenicht

Reproduced with RWT 3.29 and before and also with the latest 4.5.0-SNAPSHOT. When a column's width is reduced by dragging the column header's right border to the left, a SelectionListener (attached to the the TableColumn) receives an event. This happens only in Firefox and only when the width is reduced, not when it is expanded by dragging to the right.

Code to reproduce:

final Table table = new Table(shell, SWT.BORDER);
table.setHeaderVisible(true);
final TableColumn column = new TableColumn(table, SWT.NONE);
column.setText("Column");
column.setWidth(200);
column.addSelectionListener(new SelectionAdapter() {
	@Override
	public void widgetSelected(SelectionEvent e) {
		System.out.println("Handle Selection");
	}
});

I tested with console output in GridCollumnLabel.js (_onMouseUp and _onClick): In Firefox, you get:

_onMouseUp: this._inResize = true and this._inMove = false rap-client.js:49184:12
_onClick: this._wasResizeOrMoveEvent = true rap-client.js:49226:13
_onClick: this._wasResizeOrMoveEvent = false rap-client.js:49226:13

In Edge, Chrome and Opera, you get:

rap-client.js:49184 _onMouseUp: this._inResize = true and this._inMove = false
rap-client.js:49226 _onClick: this._wasResizeOrMoveEvent = true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions