gwt-material-table icon indicating copy to clipboard operation
gwt-material-table copied to clipboard

TableRow ShortPressHandler in combination with Button Clickhandler

Open simerlec opened this issue 6 years ago • 3 comments

Hey,

simple scenario - I have a standard table with a RowShortPressHandler. Inside the TableRows is a button with a ClickHandler. Now the usual thing would be do simply stop the propagation of the click event so that when the button is clicked the RowShortPressHandler does not fire. For some reason this does not work though. Any ideas?

My guess is that the clickHandler on the button works with standard ClickEvent whereas the RowShortPressHandler works with a different kind of event?

thanks and kr

simerlec avatar Mar 27 '18 11:03 simerlec

Did you manage to make any progress on this issue? I think that the event propagation is universal, so the RowShortPressHandler is firing before the click event is firing? That is what happens with the Row selection check box, the the row (the object that has the RowShortPressHandler) is the container to the button so it favors its events first.

BenDol avatar Apr 16 '18 21:04 BenDol

As seen here: https://github.com/GwtMaterialDesign/gwt-material-table/blob/d89aea9c47908af0a9353a4a5f3f9e862ca0a015/src/main/java/gwt/material/design/client/data/BaseRenderer.java#L169

BenDol avatar Apr 16 '18 21:04 BenDol

Thanks for the response.

I did not pursue this issue further since I went with a different approach concerning my UI.

simerlec avatar Apr 17 '18 12:04 simerlec