Closed
Bug 1325973
Opened 7 years ago
Closed 7 years ago
Bug of varaible call - name
Categories
(Firefox :: Untriaged, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: the.white.soul92, Unassigned, NeedInfo)
Details
(Whiteboard: [specification][type:bug])
Attachments
(2 files)
What did you do? ================ 1. var name = prompt('asdasd', ''); console.log(typeof name); 2. press ESC (cancel prompt, press cancel) 3. typeof name - string What happened? ============== typeof name is STRING What should have happened? ========================== typeof name must be NULL (object) Is there anything else we should know? ====================================== Any else varible (exaple Name) return Null if i cancled prompt.
Comment 1•7 years ago
|
||
That is my reading of the spec as well: http://w3c.github.io/html/webappapis.html#simple-dialogs "If the user aborts, then return null; otherwise, return the string that the user responded with." What version of Firefox are you using?
Component: BrowserCompat → Untriaged
Flags: needinfo?(the.white.soul92)
Product: Mozilla Developer Network → Firefox
Reporter | ||
Comment 2•7 years ago
|
||
Reporter | ||
Comment 3•7 years ago
|
||
Reporter | ||
Comment 4•7 years ago
|
||
This is not bug for browser - it's bag ECMA script. Screenshot in two browsers Chrome and FireFox I press ESC on prompt. As you can see - NULL - string and it name == 'null' => TRUE. But any other varaible example Name return Null and typeof Name == object is true. My version of FireFox - 50.1.0
Reporter | ||
Updated•7 years ago
|
Flags: needinfo?(the.white.soul92)
Comment 5•7 years ago
|
||
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0 I have tested the reported issue on latest FF release and latest Nightly and could reproduce it. However I get the same results in Chrome and Edge, only in Internet Explorer I get the expected result (Object). I don't think this is Firefox Specific issue.
Updated•7 years ago
|
Flags: needinfo?(the.white.soul92)
Comment 6•7 years ago
|
||
Marking this as Resolved: Incomplete due to the lack of response from the reporter. If anyone can still reproduce it on latest versions, feel free to reopen the issue and provide more information.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•