JCPalmer Posted November 21, 2014 Share Posted November 21, 2014 When a scene is a part of a page with a form, e.g. Voice-Sync Developer, messages to editable text fields to move cursor with arrow left or right are being stolen by BabylonJS. The mesh moves. Is there a way to stop this from happening? Quote Link to comment Share on other sites More sharing options...
Meulta Posted November 22, 2014 Share Posted November 22, 2014 Hello, You can maybe detach camera when focus is done on the text field and attach it again to the scene when the focus is lost from text field ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 22, 2014 Share Posted November 22, 2014 you can attachControl(canvas, false) this should work Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 25, 2014 Author Share Posted November 25, 2014 Sorry for the delayed feedback, but setting this to true or false did not do anything to stop this. Looked at FreeCamera.ts, and this has something to do with preventDefault. I have been getting a Firefox message for all any scene I load that says: "Use of getPreventDefault() is deprecated. Use defaultPrevented instead.". Never knew what it was. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 26, 2014 Share Posted November 26, 2014 we do not use getPreventDefault With false, the preventDefault is not called thus allowing focus to move outside bjs Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted December 8, 2014 Author Share Posted December 8, 2014 Well, there is no law that you have to attach the scene to a camera:scene.activeCamera.attachControl(canvas, false | true);Adding a true second argument means that both the cursor moves in the text field AND the mesh moves. I want the mesh to stay where it is. Answer is not to attach in the first place. Thought I would point this out, as people might think you have to do this, but it is just optional. c75 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.