New issue
Advanced search Search tips

Issue 601100 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Apr 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

<dialog> close function applies .toString to all passed items

Reported by dccm2...@gmail.com, Apr 6 2016

Issue description

Chrome Version       : 51.0.2689.0
Other browsers tested: Using dialog-polyfill: Firefox, IE11, Edge13 and Edge25
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari:
    Firefox:OK
         IE:
    Opera: FAIL

What steps will reproduce the problem?
(1) Create an html document with a dialog elemnt
(2) open the dialog using: dialog.showModal()
(3) add a close event to the dialog: dialog.addEventListener('close', function (event) {console.log(this.returnValue);});
(4) close the dialog using: dialog.close({test:true})

What is the expected result?
this.returnValue should be the object sent

What happens instead?
this.returnValue is the result of the object being called the .toString method [object Object]

Please provide any additional information below. Attach a screenshot if
possible.

 
bug1.jpg
12.4 KB View Download
Components: Blink>DOM

Comment 2 by tkent@chromium.org, Apr 10 2016

Components: -Blink>DOM Blink>HTML>Dialog
Owner: tkent@chromium.org
Status: WontFix (was: Unconfirmed)
https://html.spec.whatwg.org/multipage/forms.html#the-dialog-element
>  void close(optional DOMString returnValue);

The argument of `close' is a string.

Comment 3 Deleted

Comment 4 by dccm2...@gmail.com, Apr 11 2016

I read the spec again. I found the declaration you are referring to.

THANKS!

Sign in to add a comment