Explorar o código

Remove Focus if Focus is no longer visible

Reddo %!s(int64=5) %!d(string=hai) anos
pai
achega
54ad802a8e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app/Elements/Modules/HyperlinkHandler.ts

+ 1 - 1
app/Elements/Modules/HyperlinkHandler.ts

@@ -46,7 +46,7 @@ module Elements.HyperlinkHandler {
 
     export async function hyperlinkObject (thing? : any) {
         resetAvailableActions();
-        if (thing instanceof Thing && thing != WorldState.player) {
+        if (thing instanceof Thing && thing != WorldState.player && thing.isVisibleTo(WorldState.player)) {
             await HyperlinkingRulebook.execute({noun: thing});
 
             currentActionTarget.nodeValue = thing.getPrintedName() + ": ";