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

Fixes issue with initial image having unbinded event #103

Merged
merged 2 commits into from
Apr 23, 2017

Conversation

ttamminen
Copy link
Contributor

Fixes issue #102 by removing the event listener attached to the initial image.

@@ -381,6 +384,11 @@ module.exports = React.createClass({
);
},

getInitialImage () {
var images = ReactDOM.findDOMNode(this.item0).getElementsByTagName('img');
return images && images[this.props.selectedItem];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realised that there is a bug in the existent code. This will only return the initial image if selectedItem is 0.

We need to change this to be:

var images = ReactDOM.findDOMNode(this['item' + this.props.selectedItem]).getElementsByTagName('img');
return images && images[0];

@leandrowd leandrowd merged commit efb5d8e into leandrowd:master Apr 23, 2017
PradeepChada pushed a commit to PradeepChada/react-responsive-carousel that referenced this pull request Dec 22, 2021
…03/close-icon-thickness

[#180516803] - Fixed close icon thickness
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

Successfully merging this pull request may close these issues.

2 participants