@@ -2071,7 +2071,7 @@ class PopupAnnotationElement extends AnnotationElement {
20712071 container : this . container ,
20722072 color : this . data . color ,
20732073 titleObj : this . data . titleObj ,
2074- modificationDate : this . data . modificationDate ,
2074+ modificationDate : this . data . modificationDate || this . data . creationDate ,
20752075 contentsObj : this . data . contentsObj ,
20762076 richText : this . data . richText ,
20772077 rect : this . data . rect ,
@@ -2212,14 +2212,17 @@ class PopupElement {
22122212
22132213 const header = document . createElement ( "span" ) ;
22142214 header . className = "header" ;
2215- const title = document . createElement ( "h1" ) ;
2216- header . append ( title ) ;
2217- ( { dir : title . dir , str : title . textContent } = this . #titleObj) ;
2215+ if ( this . #titleObj?. str ) {
2216+ const title = document . createElement ( "span" ) ;
2217+ title . className = "title" ;
2218+ header . append ( title ) ;
2219+ ( { dir : title . dir , str : title . textContent } = this . #titleObj) ;
2220+ }
22182221 popup . append ( header ) ;
22192222
22202223 if ( this . #dateObj) {
22212224 const modificationDate = document . createElement ( "time" ) ;
2222- modificationDate . classList . add ( "popupDate" ) ;
2225+ modificationDate . className = "popupDate" ;
22232226 modificationDate . setAttribute (
22242227 "data-l10n-id" ,
22252228 "pdfjs-annotation-date-time-string"
0 commit comments