Skip to main content

inlineContainer option of Upload Widget seems broken

Comments

1 comment

  • Aleksandar Kostadinov

    Hi Adrian,

    Thanks for contacting us and providing an example.

    I've had a look and the reason you're experiencing this behaviour is that when the code reaches the call to createUploadWidget() the DOM tree does not yet know about the <div> tag with ID lewidget.

    Your selector example (https://jsfiddle.net/afoeder/amqnwjbu/) fails explicitly as it tries to match an element at that point, whereas the second example (https://jsfiddle.net/afoeder/amqnwjbu/2/) is handled slightly differently and when an element cannot be found via getElementById it defaults to a model.

    I've modified your example a little by moving the call to createUploadWidget till after the DOM loads all the elements. https://jsfiddle.net/pyj9w0ke/ 

    You can also replace the selector in my example above to use getElementById and it should also give you what you're looking for.

    Please give this a try and let me know how it goes.

     

    Regards,

    Aleksandar

    0

Post is closed for comments.