File tree 1 file changed +13
-2
lines changed
src/components/recommender-view
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -793,13 +793,19 @@ export class RecRecRecommenderView extends LitElement {
793
793
e . stopPropagation ( ) ;
794
794
e . preventDefault ( ) ;
795
795
796
- this . citeTimeBlurred ( ) ;
797
-
798
796
if ( ! this . paperOverlayElement ) {
799
797
console . error ( 'paperOverlayElement are not initialized yet.' ) ;
800
798
return ;
801
799
}
802
800
801
+ const overlayName = `${ type } -${ recommender . authorID } ` ;
802
+ if ( this . paperOverlayElement . getAttribute ( 'data-name' ) === overlayName ) {
803
+ this . citeTimeBlurred ( ) ;
804
+ return ;
805
+ }
806
+
807
+ this . citeTimeBlurred ( ) ;
808
+
803
809
// Hide the description tooltip
804
810
this . citeTimeButtonMouseLeft ( e ) ;
805
811
@@ -843,6 +849,10 @@ export class RecRecRecommenderView extends LitElement {
843
849
844
850
this . curClickedCiteTimeAuthorID = recommender . authorID ;
845
851
this . paperOverlayElement . classList . remove ( 'hidden' ) ;
852
+ this . paperOverlayElement . setAttribute (
853
+ 'data-name' ,
854
+ `${ type } -${ recommender . authorID } `
855
+ ) ;
846
856
}
847
857
848
858
citeTimeButtonMouseEntered (
@@ -903,6 +913,7 @@ export class RecRecRecommenderView extends LitElement {
903
913
}
904
914
905
915
this . paperOverlayElement . classList . add ( 'hidden' ) ;
916
+ this . paperOverlayElement . removeAttribute ( 'data-name' ) ;
906
917
this . curClickedCiteTimeAuthorID = null ;
907
918
this . overlayCleanup ( ) ;
908
919
this . overlayCleanup = ( ) => { } ;
You can’t perform that action at this time.
0 commit comments