showModalDialog becomes modal not immediately

UNCONFIRMED
Unassigned

Status

()

UNCONFIRMED
8 years ago
8 years ago

People

(Reporter: mnaoumov, Unassigned)

Tracking

4.0 Branch
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16
Build Identifier: Firefox 4.0

if you are calling showModalDialog it becomes modal not immediately and you can click on the link several times more.

Reproducible: Always

Steps to Reproduce:
1. Create two files

<!--Index.html -->
<html>
<head>
	<script type='text/javascript'>
		var counter = 0;
		function openModal() {
			counter++;
			document.getElementById('divCounter').innerHTML = 'Modal window opened ' + counter + ' times';
			window.showModalDialog('modal.html');
		}
	</script>
</head>
<body>
<input type='button' value='Open Modal' onclick='openModal()'/>
<div id='divCounter' />
</body>
</html>

<!--Modal.html -->
<html>
<head>
	<title>Modal window</title>
</head>
<body>
<h1>Modal Window.</h1>
Should be opened only once
</body>
</html>

2. Browse Index.html
3. Double click on the button 'Open Modal'
Actual Results:  
You will see 'Modal window opened 2 times'
and once you close one modal window the second is opened.

Expected Results:  
You will see 'Modal window opened 1 times'
Browser prevents you to click to the button second time.
(Reporter)

Updated

8 years ago
Hardware: x86 → x86_64
Version: unspecified → 4.0 Branch
You need to log in before you can comment on or make changes to this bug.