rfellows commented on code in PR #8870:
URL: https://github.com/apache/nifi/pull/8870#discussion_r1618830563


##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/tooltips/nifi-tooltip.directive.ts:
##########
@@ -58,11 +59,29 @@ export class NifiTooltipDirective<T> implements OnDestroy {
         }
     }
 
+    @HostListener('mousemove')
+    mouseMove() {
+        if (this.overlayRef?.hasAttached() && this.tooltipDisabled) {
+            this.overlayRef?.detach();
+        } else {
+            this.attach();

Review Comment:
   I don't think this attach is needed. In fact it causes console errors...
   
   <img width="803" alt="Screenshot 2024-05-29 at 8 49 10 AM" 
src="https://github.com/apache/nifi/assets/713866/e9060af1-ddb5-44f5-9e24-9089513668e4";>
   



##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/tooltips/nifi-tooltip.directive.ts:
##########
@@ -58,11 +59,29 @@ export class NifiTooltipDirective<T> implements OnDestroy {
         }
     }
 
+    @HostListener('mousemove')
+    mouseMove() {
+        if (this.overlayRef?.hasAttached() && this.tooltipDisabled) {
+            this.overlayRef?.detach();
+        } else {
+            this.attach();
+        }
+    }
+
+    @HostListener('mouseup')
+    mouseup() {
+        this.attach();

Review Comment:
   Nice touch but i think this should also be guarded. It currently can cause 
an error (similar to the above) if you mousedown outside of the target object 
and then mouseup over it. The tooltip will render based on the mouseenter and 
then try to attach another on the mouseup.
   ```suggestion
           if (!this.overlayRef?.hasAttached()) {
               this.attach();
           }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to