@@ -80,6 +80,7 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
8080
8181 const remiAudioEl = useRef ( null )
8282 const inputValue = useRef ( null )
83+ const rightPanel = useRef ( null )
8384
8485 useEffect ( ( ) => {
8586 plugin . call ( 'theme' , 'currentTheme' ) . then ( ( theme ) => {
@@ -97,7 +98,7 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
9798 window . addEventListener ( 'click' , ( event ) => {
9899 const target = event . target as Element
99100 const id = target . id
100- if ( id !== 'remixIDEHomeTwitterbtn' && id !== 'remixIDEHomeMediumbtn' ) {
101+ if ( id !== 'remixIDEHomeTwitterbtn' && id !== 'remixIDEHomeMediumbtn' && ! rightPanel . current . contains ( event . target ) ) {
101102 // todo check event.target
102103 setState ( prevState => { return { ...prevState , showMediaPanel : 'none' } } )
103104 }
@@ -266,7 +267,7 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
266267 </ p >
267268 < p className = "mb-1" >
268269 < i className = "mr-2 far fa-file-alt" > </ i >
269- < label className = "ml-1 remixui_home_labelIt remixui_home_bigLabelSize} remixui_home_text" htmlFor = "openFileInput" >
270+ < label className = "ml-1 remixui_home_labelIt remixui_home_bigLabelSize remixui_home_text" htmlFor = "openFileInput" >
270271 Open Files
271272 </ label >
272273 < input title = "open file" type = "file" id = "openFileInput" onChange = { ( event ) => {
@@ -334,9 +335,14 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
334335 } }
335336 > </ button >
336337 </ div >
337- < div className = "mr-3 d-flex bg-light remixui_home_panels" style = { { visibility : state . showMediaPanel === 'none' ? 'hidden' : 'visible' } } id = "remixIDEMediaPanels" >
338+ < div
339+ className = "mr-3 d-flex bg-light remixui_home_panels"
340+ style = { { visibility : state . showMediaPanel === 'none' ? 'hidden' : 'visible' } }
341+ id = "remixIDEMediaPanels"
342+ ref = { rightPanel }
343+ >
338344 < div id = "remixIDE_MediumBlock" className = "p-2 mx-1 mt-3 mb-0 remixui_home_remixHomeMedia" style = { { maxHeight : maxHeight } } >
339- < div id = "medium-widget" className = "px-3 remixui_home_media" hidden = { state . showMediaPanel !== 'medium' } style = { { maxHeight : elHeight } } >
345+ < div id = "medium-widget" className = "px-3 remixui_home_media" hidden = { state . showMediaPanel !== 'medium' } style = { { maxHeight : '10000px' } } >
340346 < div
341347 id = "retainable-rss-embed"
342348 data-rss = "https://medium.com/feed/remix-ide"
@@ -353,7 +359,7 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
353359 < div id = "remixIDE_TwitterBlock" className = "p-2 mx-1 mt-3 mb-0 remixui_home_remixHomeMedia" hidden = { state . showMediaPanel !== 'twitter' } style = { { maxHeight : maxHeight , marginRight : '28px' } } >
354360 < div className = "remixui_home_media" style = { { minHeight : elHeight } } >
355361 < a className = "twitter-timeline"
356- data-width = "330 "
362+ data-width = "375 "
357363 data-theme = { state . themeQuality . name }
358364 data-chrome = "nofooter noheader transparent"
359365 data-tweet-limit = "18"
0 commit comments