-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Conversation
There was a problem hiding this 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(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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 🙏
I'm going to merge this but remove the lines. I have a suggestion on how to fix issues you're having. |
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. |
This resolves issues #108 and #109