Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add refused-to-display tips in link-preview-overlay #1577

Merged

Conversation

Huxpro
Copy link
Contributor

@Huxpro Huxpro commented May 1, 2016

PreviewLinks is a super convenient feature while many of websites are refused to display their webpages in a frame due to their policy. Some set Content Security Policy "frame-ancestors 'none'" and others set 'X-Frame-Options'.

These kind of errors don't trigger iframe.onerror which is a big mis-implementation of browsers in my views. So we have to work around it with some tricks and my proposal is to place a z-index: -1 element under the iframe, which would be only saw if the iframe display nothing (and it mostly due to sort of 'refused-to-display' policy)

@bnjmnt4n
Copy link
Collaborator

bnjmnt4n commented Dec 9, 2016

@hakimel any opinions? I think this might be quite useful.

@hakimel hakimel merged commit e2a8634 into hakimel:dev Dec 13, 2016
@hakimel
Copy link
Owner

hakimel commented Dec 13, 2016

This is a good improvement. This message will appear whenever an iframe is unable to load, so I have changed the message a little bit. I really wish there was a way to explicitly detect when an iframe fails to load because of x-frame-options.

The error message was visible briefly when an iframe loaded successfully as well but I've added a transition to fix that.

truist added a commit to truist/reveal.js that referenced this pull request Jan 11, 2017
* hakimel/master: (140 commits)
  fix unclosed code block
  3.4.0
  fragments inherit visibility to avoid conflicts with parent slide visibility
  don't show error message while iframe fades in hakimel#1577
  always use lowercase reveal.js
  Add note about head.js to readme.
  Enable passing options for parsing Markdown.
  Reduce required Node.js version to 4.0.0.
  Reduce required Node.js version to 4.0.0.
  update dependencies to work with latest node hakimel#1743
  correct copyright message to include contributors
  Better version of data-trim on code snippets
  Update README.md to reflect current defaults in js/reveal.js
  add pdf-ready event; dispatched when the presentation is laid out and ready to print
  Bump node engine in packages.json
  Don't remove slide-number in pdf view
  Hide slide number when in paper or pdf print view
  remove debug code
  fixes ff overview rendering bug hakimel#1649
  remove unused dom lookup
  ...
SteveDesmond-ca pushed a commit to SteveDesmond-ca/presentations that referenced this pull request Apr 19, 2017
derheap pushed a commit to derheap/reveal.js that referenced this pull request Feb 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants