locked
Disabling resize handles in "contentEditable" mode (WinJS)

    Question

  • Hello,


    I'm developing a Windows Store App that uses the Remote Desktop Client ActiveX control in order to access applications running on remote machines.

    In the previous question that I asked, it was suggested to use the "contentEditable" property in order to make it possible for the user to use the soft (on-screen) keyboard to send input through the RDP client.


    One unwanted side effect to this approach that I am trying to resolve are the 'resize' handles that appear around the RDP control object, which is inside the "clientControlRegion" DIV. These resize handles look similar to this example:

    It would seem like something easy to do, but I wasn't yet able to find a way to get rid of these handles.

    I was only able to disable the resize functionality, by implementing a handler for the "oncontrolselect" event, like so (idea taken from this StackOverflow thread)

    clientControlObject.oncontrolselect = function () { return false; };

    It should also be noted that the above fix DOES work for a simple scenario of one DIV inside another DIV (I've tested it). But the RDP control (an ActiveX object) seems to exhibit different behavior in this regard.

    Is there a known way to fix this?

    Best Regards,

    -Paul


    • Edited by paulkore Monday, November 11, 2013 2:43 PM
    Monday, November 11, 2013 2:43 PM

Answers

  • Hi Paul,

    Actually try setting the contentEditable property of the <object id="clientControl" ...> to true - where clientControl is the ID of the RDP object, instead of setting it for the <div>. That should cause the resize handles to disappear.

    Thanks,

    Prashant.


    Windows Store Developer Solutions, follow us on Twitter: @WSDevSol|| Want more solutions? See our blog

    • Marked as answer by paulkore Monday, November 11, 2013 9:07 PM
    Monday, November 11, 2013 8:18 PM
    Moderator

All replies

  • Hi Paul,

    Actually try setting the contentEditable property of the <object id="clientControl" ...> to true - where clientControl is the ID of the RDP object, instead of setting it for the <div>. That should cause the resize handles to disappear.

    Thanks,

    Prashant.


    Windows Store Developer Solutions, follow us on Twitter: @WSDevSol|| Want more solutions? See our blog

    • Marked as answer by paulkore Monday, November 11, 2013 9:07 PM
    Monday, November 11, 2013 8:18 PM
    Moderator
  • Hi Prashant,

    Coincidentally I discovered this fix about half an hour ago, and was just going to comment.

    Thanks for your help!

    -Paul

    Monday, November 11, 2013 9:07 PM