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

dart2js document.hidden returns null in firefox #13411

Closed
DartBot opened this issue Sep 18, 2013 · 9 comments
Closed

dart2js document.hidden returns null in firefox #13411

DartBot opened this issue Sep 18, 2013 · 9 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant library-html P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Sep 18, 2013

This issue was originally filed by everton.marqu...@gmail.com


What steps will reproduce the problem?

  1. create a web app with the attached hidden.dart
  2. compile with dart2js -c
  3. open with firefox

What is the expected output?
document.hidden : true OR false (non-null)

What do you see instead?
document.hidden : null

What version of the product are you using?
Dart Editor version 0.7.3_r27487
Dart SDK version 0.7.3.1_r27487
Firefox 24

On what operating system?
64-bit Windows 7

Please provide any additional information below.

I see the following output from hidden.dart:

Dartium:

document.hidden : false

hidden : false
hidden == null : false
hidden is bool : true

dart2js + Chrome:

document.hidden : false

hidden : false
hidden == null : false
hidden is bool : true

dart2js + Firefox:

document.hidden : null

hidden : null
hidden == null : true
hidden is bool : false


Attachment:
hidden.dart (488 Bytes)

@floitschG
Copy link
Contributor

Added Area-HTML, Triaged labels.

@efortuna
Copy link
Contributor

efortuna commented Oct 3, 2013

Added html-api label.

@blois
Copy link
Contributor

blois commented Oct 3, 2013

Added this to the Later milestone.
Removed html-api label.

@DartBot
Copy link
Author

DartBot commented Oct 4, 2013

This comment was originally written by everton.mar...@gmail.com


This issue affects the Page Visibility API for Dart:

http://www.w3.org/TR/2011/WD-page-visibility-20110602/

@kevmoo
Copy link
Member

kevmoo commented Apr 7, 2014

Removed Area-HTML label.
Added Area-Library, Library-Html labels.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@DartBot
Copy link
Author

DartBot commented Nov 7, 2014

This comment was originally written by matthew1...@gmail.com


The issue also impacts Safari.

I am, however, able to check document.visibilityState and receive either: 'visible' or 'hidden'

The Page Visibility API, in the current spec as of this writing (http://www.w3.org/TR/page-visibility/), also specifies the vendor optional: 'prerender' and 'unload'

'prerender' and 'unload' is implied to be correspond to hidden == true.

As such I can work around this by wrapping the document.visibilityState for now.

@alan-knight
Copy link
Contributor

Still true in 1.8 with Safari and Firefox.


Removed Priority-Unassigned label.
Added Priority-Medium, Accepted labels.

@DartBot DartBot added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-html labels Jan 23, 2015
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed accepted labels Feb 29, 2016
@matanlurey matanlurey added the closed-obsolete Closed as the reported issue is no longer relevant label Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant library-html P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

8 participants