Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onSelectSlot callback is called instead of onSelectEvent (sometimes) #614

Closed
remituveri opened this issue Nov 8, 2017 · 8 comments
Closed

Comments

@remituveri
Copy link

Sometimes, clicking on an event will execute the onSelectSlot callback (instead of onSelectEvent)
This is caused by the document.elementFromPoint (in isEvent function of Selection.js) which will return the span contained in the rbc-slot-selection div...
Removing the following code from DayColumn.js fixed that issue but I'm not sure 100% that it's the better way to do it. rbc-slot-selection does not seems to be used

&& _react2.default.createElement(
'div',
{ className: 'rbc-slot-selection', style: style },
_react2.default.createElement(
'span',
null,
_localizer2.default.format(selectDates, selectRangeFormat, culture)
)
)

@jquense
Copy link
Owner

jquense commented Feb 5, 2018

Sorry folks I can't reproduce on the examples, perhaps it was inadvertently fixed recently

@jquense jquense closed this as completed Feb 5, 2018
@arximughal
Copy link

@jquense it's not fixed I guess. I am facing the same issue!
It's on the demo page as well!
Reproduce:

  • Go to DEMO
  • Navigate to the Selectable event tab
  • Click on the events there

Events in all day group seems to be working just fine. But the events underneath aren't working!
Click a couple of times on different parts of the events e.g., Click on Time, Click on any place other than the title...

The solution by SamHurne in #630 seemed to have fixed the issue previously. But we updated the package recently and that fix is not working either!

@arximughal
Copy link

rbc
@jquense the issue occurs on some events in different scenarios!

@noagani
Copy link

noagani commented May 3, 2018

I had this problem. Resolved it very simple: I gave the event class z-index:999 so when clicking an event it will catch the event and not the slot below.

@llewellyncollins
Copy link

This issue is still happening for me.

@noagani that fix did not work for me

@arximughal
Copy link

@noagani that was the first thing I tried. Did work for sometime. But recently, after upgrading to the latest version, the z-index stopped working for me.

@ash-PS
Copy link

ash-PS commented May 28, 2018

Also still happening for me.

@gamemore
Copy link

gamemore commented Jun 7, 2018

z-index is not working for me too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants