The Return Value Problem of onBlockSelect Function
Noostop opened this issue · 2 comments
Noostop commented
This repo is currently on low maintenance. See README for details
Problem
The return value of calling this function is Blockid, and the current DOM is not returned.The current block is not available at the time of selection.
Replication steps
thieme-section.js 270 line,
Old
document.addEventListener('shopify:block:select', function(event) {
var instance = getInstanceById(event.detail.sectionId);
if (typeof instance === 'object') {
instance.onBlockSelect(event.detail.blockId, event.detail.load);
}
});
New
document.addEventListener('shopify:block:select', function(event) {
var instance = getInstanceById(event.detail.sectionId);
if (typeof instance === 'object') {
instance.onBlockSelect(event);
}
});
More Information
Maybe you have a better way.
oscarstranger commented
@Noostop This has been previously raised and is now patched in theme-scripts
v2.0+
Noostop commented
@Noostop This has been previously raised and is now patched in
theme-scripts
v2.0+
Thanks