File tree Expand file tree Collapse file tree
log-viewer/src/features/timeline/optimised Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -228,12 +228,16 @@ export class ApexLogTimeline {
228228 */
229229 private handleFind = ( event : Event ) : void => {
230230 // Only process if this timeline instance is active
231- if ( ! this . container || ! this . container . isConnected ) {
231+ if ( ! this . container || ! this . container . isConnected || ! this . container . clientHeight ) {
232232 return ;
233233 }
234234
235235 const customEvent = event as CustomEvent < FindEventDetail > ;
236236 const { text, options } = customEvent . detail ;
237+ if ( ! text ) {
238+ this . handleFindClose ( ) ;
239+ return ;
240+ }
237241
238242 // Convert search text to predicate function (thin facade)
239243 const caseSensitive = options . matchCase ;
@@ -293,6 +297,8 @@ export class ApexLogTimeline {
293297
294298 // Clear search state (FlameChart handles render)
295299 this . flamechart . clearSearch ( ) ;
300+
301+ document . dispatchEvent ( new CustomEvent ( 'lv-find-results' , { detail : { totalMatches : 0 } } ) ) ;
296302 } ;
297303
298304 /**
You can’t perform that action at this time.
0 commit comments