Dialog.prototype.ngAfterViewInit = function () {
var _this = this;
this.contentContainer = this.domHandler.findSingle(this.el.nativeElement, '.ui-dialog-content');
this.center();
if (this.draggable) {
this.documentDragListener = this.renderer.listenGlobal('body', 'mousemove', function (event) {
_this.onDrag(event);
});
}
Was trying to get the draggable attribute to turn to false so the user cannot drag the modal dialog around. I narrowed the issue down to the dialog.js file code shown above. Inspecting in Chrome dev tools shows that the comparison if(this.draggable) {...} is receiving the string value of "false" instead of the boolean value of false, so it always sets up the drag event.
I changed the dialog.js file to if(this.draggable != "false") and achieved the desired result.
Nevermind on this. I did a search of the other issues and found that when using the attributes I need to use square brackets around the attribute name to get it to work.
so it should look like this...
<p-dialog header="Login" [(visible)]="display" [draggable]=false>
Most helpful comment
Nevermind on this. I did a search of the other issues and found that when using the attributes I need to use square brackets around the attribute name to get it to work.
so it should look like this...
<p-dialog header="Login" [(visible)]="display" [draggable]=false>