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

Remove preventDefault, and load toggle in stream #110

Merged
merged 1 commit into from
May 9, 2020

Conversation

vanboom
Copy link

@vanboom vanboom commented Mar 31, 2020

This resolves issues #108 and #109

Copy link
Owner

@nikolalsvk nikolalsvk left a comment

Choose a reason for hiding this comment

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

I approve of removing event.preventDefault() and I will test scenarios with it.

I left comments about the other 2 changes I think we should keep.

_runAfterDocumentLoaded(_setUpToggle)
//_runAfterDocumentLoaded(_setUpToggle)
// RUN IT NOW DP
_setUpToggle();
Copy link
Owner

Choose a reason for hiding this comment

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

Can you remove this line, _setUpToggle() is supposed to happen after the page loads, so that we don't miss any elements that are potentially loading. This was a fix for #90

Copy link
Author

@vanboom vanboom Apr 8, 2020

Choose a reason for hiding this comment

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

Regarding #90, is "lazy load" implemented yet? Running after the document is loaded is causing issues where I want to trigger the toggle manually on page load. Basically I use the same partial on two views. On one view, I want the async partial to render on user command, on the other, I want the same async partial to render automatically. This is easily done by triggering a click on the selector: $(selector).click(); The delayed _setupToggle call does not allow us to perform the click() in the normal view/partial rendering. (issue #108)

In 2.1.14, I was not experiencing the issue as described in #90.

Copy link
Owner

Choose a reason for hiding this comment

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

Regarding #90, is "lazy load" implemented yet?

No, lazy load is not implemented yet.

This is easily done by triggering a click on the selector: $(selector).click(); The delayed _setupToggle call does not allow us to perform the click() in the normal view/partial rendering.

Have you tried what I proposed in the comment for #108 #108 (comment)?

@@ -134,7 +133,7 @@
}
}

_runAfterDocumentLoaded(_setUpToggle);
_setUpToggle();
Copy link
Owner

Choose a reason for hiding this comment

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

Also here, can you remove this line 🙏

@nikolalsvk
Copy link
Owner

I'm going to merge this but remove the lines. I have a suggestion on how to fix issues you're having.

@vanboom
Copy link
Author

vanboom commented Jun 12, 2020

Ok - great. Sorry I am not sure how to remove the requested lines in the PR. My apps are using this fork because of the issue that I am having with post 2.5.1 changes per #108.

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