@@ -737,20 +737,6 @@ export class MouseTargetFactory {
737
737
return request . fulfillContentEmpty ( new Position ( lineCount , maxLineColumn ) , EMPTY_CONTENT_AFTER_LINES ) ;
738
738
}
739
739
740
- // Do the hit test (if not already done)
741
- const hitTestResult = request . hitTestResult . value ;
742
-
743
- if ( hitTestResult . type === HitTestResultType . Content ) {
744
- return MouseTargetFactory . createMouseTargetFromHitTestPosition ( ctx , request , hitTestResult . spanNode , hitTestResult . position , hitTestResult . injectedText ) ;
745
- }
746
-
747
- // We didn't hit content...
748
- if ( request . wouldBenefitFromHitTestTargetSwitch ) {
749
- // We actually hit something different... Give it one last change by trying again with this new target
750
- request . switchToHitTestTarget ( ) ;
751
- return this . _createMouseTarget ( ctx , request ) ;
752
- }
753
-
754
740
// Check if we are hitting a view-line (can happen in the case of inline decorations on empty lines)
755
741
// See https://github.com/microsoft/vscode/issues/46942
756
742
if ( ElementPath . isStrictChildOfViewLines ( request . targetPath ) ) {
@@ -770,6 +756,20 @@ export class MouseTargetFactory {
770
756
}
771
757
}
772
758
759
+ // Do the hit test (if not already done)
760
+ const hitTestResult = request . hitTestResult . value ;
761
+
762
+ if ( hitTestResult . type === HitTestResultType . Content ) {
763
+ return MouseTargetFactory . createMouseTargetFromHitTestPosition ( ctx , request , hitTestResult . spanNode , hitTestResult . position , hitTestResult . injectedText ) ;
764
+ }
765
+
766
+ // We didn't hit content...
767
+ if ( request . wouldBenefitFromHitTestTargetSwitch ) {
768
+ // We actually hit something different... Give it one last change by trying again with this new target
769
+ request . switchToHitTestTarget ( ) ;
770
+ return this . _createMouseTarget ( ctx , request ) ;
771
+ }
772
+
773
773
// We have tried everything...
774
774
return request . fulfillUnknown ( ) ;
775
775
}
0 commit comments