polymer icon indicating copy to clipboard operation
polymer copied to clipboard

Polymers elements cannot go fullscreen

Open arkeros opened this issue 12 years ago • 2 comments

It seems that (nested) polymer elements cannnot go fullscreen themselves:

Suppose that all these codes are preceded by an import of https://github.com/sindresorhus/screenfull.js/#why

This does not work:

  <core-tooltip label='Fullscreen'>
    <core-icon-button icon='fullscreen' onclick='screenfull.toggle(this)'></core-icon-button>
  </core-tooltip>

But this does:

<div>
    <button onclick='screenfull.toggle(this)'></button>
  </div>

On the other hand, they CAN send the whole page to fullscreen

  <core-tooltip label='Fullscreen'>
    <core-icon-button icon='fullscreen' onclick='screenfull.toggle()'></core-icon-button>
  </core-tooltip>

What makes me think it has to do with 'shadow-root'.

arkeros avatar Sep 05 '14 19:09 arkeros

What version of Polymer are you using? This seems to work fine for me on 0.4.0.

If you're seeing this problem on the latest release, can you post a more complete code snippet?

My extremely simple test case based on your report:

https://gist.github.com/arthurevans/b00cf9fe0481b634bdb4

arthurevans avatar Sep 05 '14 20:09 arthurevans

Looks like this might be solved? Please feel free to re-open if not the case.

tjsavage avatar Oct 06 '14 16:10 tjsavage