Closed
Bug 550709
Opened 15 years ago
Closed 14 years ago
arrow keys disabled in textbox when loading Adobe Reader in iframe
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: sflitman, Assigned: jimm)
References
()
Details
(Keywords: regression)
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
This applies only to Windows XP SP3 as far as I can tell, but I suspect may affect a fair number of users. Basically, my custom mail program uses a textbox for the subject line so you can rename messages based on their content, displayed as a PDF attachment in an iframe. Only in 3.6 does this happen, it was fine in 3.58 and all FF versions prior. The arrow keys, as well as Home and End, are inoperative in the textbox but appear to control the Adobe reader, scrolling the document etc., even when the textbox has focus as noted by a blinking caret. This breaks my app because I am depending on the dropdown automatic selections to rapidly classify messages, a la Amazon's Mechanical Turk. Please fix in next update, I'm sure this has something to do with the key event filter chain.
Reproducible: Always
Steps to Reproduce:
1. Go to http://xenoscience.com/mozilla/problem.htm
2. Note that arrow keys do not move caret in textbox
3. Note that Home and End are also disabled.
Actual Results:
arrow keys do not move caret in textbox
Expected Results:
arrow keys should move caret in textbox
This does not happen on Linux versions of Firefox, by the way, but my Ubuntu installation is 3.58.
Reporter | ||
Updated•15 years ago
|
Severity: normal → major
I am seeing the same problem on Vista SP2 using Firefox 3.6.3. I confirmed that this problem did not exist on 3.0 and 3.5. Something is swallowing the keydown and keypress events. I have a testcase that can be used to easily show this.
---BEGIN TEST
<html>
<head>
<title>JavaScript - Detecting keystrokes</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
var pdfURL = 'http://samplepdf.com/sample.pdf';
window.onload = function () {
init();
};
document.defaultAction = true;
function init() {
var x = document.getElementById('testForm').getElementsByTagName('input');
for (var i=0;i<x.length;i++) {
x[i].onclick = setEvents;
if (x[i].checked)
x[i].onclick();
}
writeroot = document.getElementById('writeroot');
document.getElementById('emptyWriteroot').onclick = function () {
writeroot.innerHTML = '';
return false;
}
}
function setEvents() {
if (this.id == 'default') {
document.defaultAction = !this.checked;
return;
}
var eventHandler = (this.checked) ? detectEvent : empty;
document.getElementById('textfield')['on'+this.id] = eventHandler;
//document['on'+this.id] = eventHandler;
}
function detectEvent(e) {
var evt = e || window.event;
writeData('<b>'+evt.type+'</b>: keyCode=' + evt.keyCode+' : charCode=' + evt.charCode);
return document.defaultAction;
}
function empty() {
// nothing
}
var writeroot;
function writeData(msg) {
writeroot.innerHTML += msg + '<br />';
}
</script>
<style type="text/css">
body {
font-size: 12px;
}
#writeroot {
height: 300px;
overflow: auto;
border: 1px solid #2EB2DC;
}
</style>
</head>
<body>
<form id="testForm">
<input type="checkbox" id="keydown" /> <label for="keydown">keydown</label><br />
<input type="checkbox" id="keypress" /> <label for="keypress">keypress</label><br />
<input type="checkbox" id="keyup" /> <label for="keyup">keyup</label><br />
<input type="checkbox" id="default" /> <label for="default">Suppress default action</label><br />
<input type="text" id="textfield" /><br />
<button id="emptyWriteroot">Remove messages</button>
</form>
<a href="#" onclick="document.getElementById('docviewer-page').src=pdfURL;return false">Now load IFrame</a>
<p id="writeroot"></p>
<div id="container2" style="border:1px solid black;width:400px;height:200px">
<iframe
id='docviewer-page'
name='docviewer-page'
title='document page'
src='http://www.google.com'
align='left'
width='100%'
height='100%'
scrolling='auto'
frameborder=0></iframe>
</div>
</body>
</html>
---BEGIN TEST
Paste the above into an HTML document. Open the HTML document in firefox. Check the four checkboxes. Move into the text field and press arrow keys and enter key to observe the results when it is working correctly. Then click on the "Now Load PDF" link. Press the arrow keys and enter key again and observe that the behavior has changed.
This is a major problem for my application.
Comment 2•14 years ago
|
||
I have the same problem here and it breaks my XULRunner based application.
Looks like bug 556820 handles the same problem.
Comment 3•14 years ago
|
||
Comment 4•14 years ago
|
||
The testcase shows the behaviour. After loading the pdf dynamically in the iframe the caret is still blinking in the input element. But when typing no character will be entered.
Comment 5•14 years ago
|
||
Safari seems to have the same bug (Windows 7). In IE and Opera the input element looses the focus.
Reporter | ||
Comment 6•14 years ago
|
||
This is still a problem in 3.6.8, I'm trying to see if it's specific to Adobe Reader as I've installed Foxit Reader for Windows XP.
Reporter | ||
Updated•14 years ago
|
Version: unspecified → 3.6 Branch
Comment 7•14 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2a1pre) Gecko/20090610 Minefield/3.6a1pre Works
http://hg.mozilla.org/mozilla-central/rev/90d3e6d2cbb9
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2a1pre) Gecko/20090611 Minefield/3.6a1pre is broken
http://hg.mozilla.org/mozilla-central/rev/4430cae50dad
Looks like a regression from bug 178324
Blocks: 178324
Keywords: regression
Updated•14 years ago
|
Status: UNCONFIRMED → NEW
Component: Keyboard Navigation → Event Handling
Ever confirmed: true
Product: Firefox → Core
QA Contact: keyboard.navigation → events
Version: 3.6 Branch → 1.9.2 Branch
Comment 8•14 years ago
|
||
Forgot to add the changes between the two builds http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=90d3e6d2cbb9&tochange=4430cae50dad
Updated•14 years ago
|
blocking1.9.2: --- → ?
blocking2.0: --- → ?
Comment 9•14 years ago
|
||
Wanted for the 3.6.x branch, but not blocking security updates. Will look at a patch if it gets a trunk fix.
blocking1.9.2: ? → -
status1.9.2:
--- → wanted
Comment 10•14 years ago
|
||
I notice that Acrobat is stealing keystrokes even when another part of the UI
is focused. For example, while the testcase is loaded, click in the url bar and
start typing. Then press cursor up/down. The pdf page scrolls even though focus
isn't in it.
Bug 521951 may also play a role.
Comment 11•14 years ago
|
||
Is this an issue for 1.9.2 only, or does it apply to trunk as well (i.e. Firefox 4 beta6 etc)?
Assignee: nobody → jmathies
Updated•14 years ago
|
blocking2.0: ? → -
Comment 12•14 years ago
|
||
I observed a similar behavior today in Firefox 3.6.13, running on Windows 7 Ultimate. The PDF is in a standard frame, rather than an iFrame, on the page where I encountered this issue.
Holding the arrow keys long enough to trigger auto-repeat successfully moves the insertion point. Home, End, and single presses of the left or right arrow keys are ignored.
Assignee | ||
Comment 13•14 years ago
|
||
WFM in 4.0. Please re-open if still see the issue.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
Comment 14•12 years ago
|
||
I'm still seeing the issue. Not just in iframes, but any time the plugin is in use. Out-of-process plugins are disabled on my computer.
Comment 15•12 years ago
|
||
I have this issue with XUL Runner 19.0 under Windows 7.
Have tried Adobe Reader X & XI both versions behave in the same way.
Comment 16•12 years ago
|
||
For anybody else that runs into this problem I worked around it by loading the PDF using http://pdfobject.com/ in an HTML iframe - rather than loading the PDF directly into the iframe.
Updated•6 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•