File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/addons/addons/toolbox-category-drag Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ export default async function ({ addon }) {
141141 toolbox . position ( ) ;
142142 }
143143
144- function initDragDroper ( clickEvent ) {
144+ function initDragDroper ( clickEvent , blocklyToolboxDiv ) {
145145 const draggedCat = clickEvent . target . closest ( `div[class="scratchCategoryMenuRow"]` ) ;
146146 if ( ! draggedCat ) return ;
147147
@@ -239,7 +239,7 @@ export default async function ({ addon }) {
239239 /* Check for Long (500ms) Presses to not confuse with Selecting Categories */
240240 const blocklyToolboxDiv = document . querySelector ( `div[class*="blocklyToolboxDiv"` ) ;
241241 blocklyToolboxDiv . addEventListener ( "mousedown" , ( e ) => {
242- const longPressTimer = setTimeout ( ( ) => initDragDroper ( e ) , 500 ) ;
242+ const longPressTimer = setTimeout ( ( ) => initDragDroper ( e , blocklyToolboxDiv ) , 500 ) ;
243243 const cancel = ( ) => clearTimeout ( longPressTimer ) ;
244244
245245 document . addEventListener ( "mouseup" , cancel , { once : true } ) ;
You can’t perform that action at this time.
0 commit comments