| @@ -1,4 +1,4 @@ | ||
| 1 | 1 | // --------------------------------------------------------------------------------------------------------------------- |
| 2 | 2 | // == File /includes/page-form-builder/_out/bfb-builder.js == Time point: 2025-09-06 14:08 |
| 3 | 3 | // --------------------------------------------------------------------------------------------------------------------- |
| 4 | 4 | |
| @@ -1175,10 +1175,10 @@ | ||
| 1175 | 1175 | } catch ( _e2 ) {} |
| 1176 | 1176 | return false; |
| 1177 | 1177 | } |
| 1178 | 1178 | |
| 1179 | - // Open modal with prefilled search. | |
| 1180 | - window.wpbc_bfb__menu_forms__apply_template_search( search_key, null ); | |
| 1179 | + // Open modal with prefilled search and preselect the first non-blank result. | |
| 1180 | + window.wpbc_bfb__menu_forms__apply_template_search( search_key, null, { auto_select_first_real: true } ); | |
| 1181 | 1181 | |
| 1182 | 1182 | return true; |
| 1183 | 1183 | |
| 1184 | 1184 | } catch ( _e3 ) { |
| @@ -1378,9 +1378,9 @@ | ||
| 1378 | 1378 | |
| 1379 | 1379 | if ( is_from_palette ) { |
| 1380 | 1380 | // Read data before removing the temporary clone. |
| 1381 | 1381 | const field_data = WPBC_Form_Builder_Helper.get_all_data_attributes( el ); |
| 1382 | - const usage_key = paletteId; | |
| 1382 | + const usage_key = field_data.usage_key || paletteId; | |
| 1383 | 1383 | field_data.usage_key = usage_key; |
| 1384 | 1384 | if ( 'uid' in field_data ) { |
| 1385 | 1385 | delete field_data.uid; // Guard: never carry a UID from palette/DOM clones. |
| 1386 | 1386 | } |
| @@ -2373,5 +2373,5 @@ | ||
| 2373 | 2373 | window.wpbc_bfb_api.with_builder(function (B) { |
| 2374 | 2374 | B.set_preview_mode(enabled, { rebuild: true, reinit: true, source: 'settings-effects' }); |
| 2375 | 2375 | }); |
| 2376 | 2376 | |
| 2377 | - */ | |
| 2377 | + */ | |