table (react) eats all click events #291

Closed
toddself opened this Issue Dec 1, 2016 · 6 comments

Projects

None yet

6 participants

@toddself
toddself commented Dec 1, 2016

Bug report

  • Package version(s): 1.1.0
  • Browser and OS versions: MacOS 10.11.6 & Ubuntu 16.10 both with Chrome 54.0.2840.98. Mac 10.11.6 with Safari 10.0.1

Steps to reproduce

  1. Create a table
  2. Attach an onClick or onMouseDown/Up handler to an element rendered in that table
  3. Click on that element and the handler will never fire
  4. You can best demonstrate this by going to the demo (http://blueprintjs.com/docs/#components.table-js.example-editable) and trying to use your mouse to move the cursor to the beginning of the field after you activate it for editing.

cannot-click

(All that mouse hovering is me trying to click to move the cursor around)

Actual behavior

Mouse click events are not propagated to children cells (even if you set the SelectionModes to NONE.)

Expected behavior

Children elements of the table to be able to receive and respond to click events.

@llorca llorca added this to the 1.3.0 milestone Dec 1, 2016
@themadcreator themadcreator was assigned by llorca Dec 1, 2016
@themadcreator
Contributor

Yep, there are a few event.stopPropagation() calls in dragEvents.ts. We did this to take over control of selection of cells and to prevent native text selection, which looks weird then we have our own cell selection overlays.

Furthermore, the <EditableText> component we use in editable cells will grab focus on a single click, but we only want to edit on double click.

We obviously need to address the issue the reporter is seeing, but some thought is required.

@adidahiya
Member

@toddself out of curiosity, what do you intend to use the mouse event handlers for?

@toddself
toddself commented Dec 2, 2016
@llorca
Contributor
llorca commented Dec 2, 2016

Wow, I wasn't aware of this issue. I just played with it, there's no text/mouse interactions on a (non-header) cell that's being edited -- can't click to move the cursor, can't click+drag to select portions of text... yet, selection by clicking is still possible. Hopefully we can figure out a fix soon

@adidahiya adidahiya added the P1 label Dec 2, 2016
@brandonchoe

When will this be fixed? And about when will 1.3.0 be out?

@llorca
Contributor
llorca commented Dec 9, 2016

@brandonchoe we were planning on fixing it this week, but the assignee needed to take care of a bunch of personal matters. 1.3.0 is coming today without this fix, and I'm hopeful 1.4.0 will address this issue

@llorca llorca modified the milestone: 1.3.0, 1.4.0 Dec 12, 2016
@giladgray giladgray modified the milestone: 1.5.0, 1.6.0 Jan 5, 2017
@giladgray giladgray closed this in #427 Jan 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment