admin管理员组

文章数量:1391960

I have an overlay panel from primeng, I am using appendTo="body" and it work fine in Chrome, but does't work in Internet Explorer 11. When I click it in IE the panel just doesn't appear, if I remove the appendTo="body", it works fine in internet explorer but the panel is just off in the middle of the page. Is there work around this?

<button (click)="tagSelect.toggle($event)">Click</button>
<p-overlayPanel #tagSelect [dismissable]="true" appendTo="body" [showCloseIcon]="true">
       some content
 </p-overlayPanel>

css of .ui-overlaypanel

      display: block;
      z-index: 1019;
      top: 110.862px;
      left: 213.2px;
      opacity: 1;

I have an overlay panel from primeng, I am using appendTo="body" and it work fine in Chrome, but does't work in Internet Explorer 11. When I click it in IE the panel just doesn't appear, if I remove the appendTo="body", it works fine in internet explorer but the panel is just off in the middle of the page. Is there work around this?

<button (click)="tagSelect.toggle($event)">Click</button>
<p-overlayPanel #tagSelect [dismissable]="true" appendTo="body" [showCloseIcon]="true">
       some content
 </p-overlayPanel>

css of .ui-overlaypanel

      display: block;
      z-index: 1019;
      top: 110.862px;
      left: 213.2px;
      opacity: 1;
Share Improve this question edited Feb 22, 2018 at 11:40 Suresh Ponnukalai 14k5 gold badges35 silver badges54 bronze badges asked Feb 22, 2018 at 9:46 sashafedsdevsashafedsdev 1692 gold badges3 silver badges11 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 1

The issue I had is the inline style in the button caused the problem, now I use appendTo="body" and it work fine in Chrome and IE.

<button style="float: right; position: relative; margin: 15px;">Click</button>

change to:

<button>Click</button>

本文标签: javascriptprimeng overlay panel appendToquotbodyquot alternative cssStack Overflow