Closed marutim closed 5 years ago
@nishitlangaliya Please discuss with @marutim so you can get access to the X theme and Cornerstone plugin for testing.
@kevinwhoffman , Sure will discuss with @marutim. once I reach to this issue.
@marutim , We will need latest version of Cornerstone plugin to see if it has still issue. if latest plugin have same issue with modal popup. Then we will need development version of Cornerstone plugin to see their .js files. Because this version have all files minified and finding difficult to troubleshoot.
@mathetos Can you help @nishitlangaliya here with the latest version of the cornerstone plugin? or do you want me to ask the user to share the latest version?
Also, I am not sure how can I get the development version of the plugin.
@marutim , I have gone through the cornorstone plugin core js files and found that wp-content\plugins\cornerstone\assets\dist\js\site\cs-body.js
code prevents modal popup open in form grid in mobile device. Since it is minified version unable to find cause of issue. so here two possibility.
wp-content\plugins\cornerstone\assets\dist\js\site\cs-body.js
developer version I mean un minified version so I can do more troubleshoot into it.Thanks
@nishitlangaliya Thank you for looking at it.
I am not sure how can we get an unminified version of the file. The user will always have the same minified version. To get the developer version, I guess we will have to contact x theme and that is something @kevinwhoffman @mathetos can help you with.
BTW have you checked unminifying the js file using services like https://unminify.com/ or similar. I am sure @ravinderk and @mehul0810 might share some tips to help here as well. Thanks!
@marutim , Thanks for your reply. As per your suggestion I have gone through that step and unminify js using online. And after that I was able to found the source of issue. But since we did it from minify to unminfy, variable names like a, b, c, remains same. so difficult to find fix. I have discussed same with @ravinderk and he also suggest to have un minify version of js or we can contact to Xtheme support team.
Thanks
I've reached out to the X Theme authors via their website. I'll keep everyone posted.
Removing from 2.4.0 release and will reassign to an appropriate release if we hear back.
@mathetos thanks for reaching out! Sorry for the delay getting back to you. I've tried this out and I can shed some light on the situation from Themeco's end.
X (and Pro) include a feature that will automatically scroll you to a section when you click on a link where the href
matches an id
of another element on the page. It accounts for the height of a fixed header so the top of the destination content lines up under the header when the animation completes. It runs on the click
and touchend
events and calls e.preventDefault()
.
The Give grid markup uses a similar pattern where anchor href
attributes are paired with id
. You could use the script below to abort the scroll behavior when clicking on a grid card.
window.jQuery(function($){
window.csGlobal.csHooks.filter('hash_scrolling_allow', function(allow, el) {
return $(el).hasClass('give-card') ? false : allow
});
})
That being said, it's likely that you'll run into this with other themes later on. It might be better to completely prevent the click
and touchend
events from propagating outside the grid. For example, if you placed the following code somewhere in the vicinity of the modal setup (https://github.com/impress-org/give/blob/release/2.4.0/assets/src/js/frontend/give-misc.js#L17-L27).
jQuery('.give-wrap').on('touchend click', '.js-give-grid-modal-launcher', function(e) {
e.stopPropagation()
})
That would stop propagation late enough for the modal to be opened, but keep delegated body listeners (like the one in X/Cornerstone) from running.
Bug Report
User Story
As an admin, I would like to use the Form Grid shortcode in x-theme without any issues.
At the moment, the grid form with display_style set to modal reveal does not work in mobile devices.
The modal works as intended in desktop but in Mobile devices it does not open the modal whereas the modal works fine in mobile when the theme is set to a WP default theme like Twenty Seventeen.
Current Behavior
The modal does not open in mobile devices with x theme activated.
Expected Behavior
The modal should work in all theme and devices.
Bug Type
Steps to Reproduce
Related
HS link: https://secure.helpscout.net/conversation/723380294/30493?folderId=1457790
Acceptance Criteria
Environment