Artem Speedov Artem Speedov - 1 month ago 6
AngularJS Question

Can't select nothing inside draggable modal window

Please someone help. I'm really broken my brain on this. Neither select text inside modal nor click on input to type text into it.

I think it's because of z-index bugs. But can't find them.

var currentZ = null,
baseZ = 1000,
maxZ = 2000;


Here is an example: http://jsfiddle.net/emvc79sa/1/

This is directive angular-html-window

Answer

I'm not sure why the directive author set it this way, but your click actions are consumed by this line:

Window.prototype = {

    _resizing: null,
    _moving: null,
    _restore: null,

    events: {
        wnd_mousedown: function(event) {
            this.focus();
            event.preventDefault(); // this line
        },

Commenting out this line will let you highlight as normal but I'm not sure if there is any side effects.

Comments