Skip to main content

Bug Tracker

Side navigation

#3260 closed bug (fixed)

Opened August 18, 2008 09:37PM UTC

Closed April 17, 2011 07:26PM UTC

Last modified April 17, 2011 08:16PM UTC

Weird IE7 behavior when focussing on a text input inside a div with padding

Reported by: asprouse Owned by:
Priority: low Milestone:
Component: effects Version: 1.2.6
Keywords: IE7, slide Cc: flesler, asprouse
Blocked by: Blocking:


Here is a very simple example which will produce this behavior:

            <script type="text/javascript" src="jquery-1.2.6.js"></script>
            <style type="text/css">
                #box {				
                    padding: 10px;
            <script type="text/javascript">
                function show () {
        <input type="button" value="Click Here" onClick="show()" />
            <div id="box" style="display:none">
                <input type="text" id="target" />

What we want to happen is to use the slideDown effect to show the "box" div and then focus on the "target" input. This works fine in firefox, however IE7 starts to do the slide down effect and once the callback is performed, "target disappears and the cursor appears to the left of the button. This does not happen if the padding is removed. Another way in which this works properly is if there is something to delay the focus() function call. For example:

function show () {


function show () {

It seems as if there is some issue with the callback be fired while IE is still calculating the padding, but that is just a guess.

Steps to Repeat

1. Copy the html code from above into an .html file

2. Download the latest stable jQuery (at this time 1.2.6)

3. Load the .html file created in step 1 into IE7

4. Click the "Click Here" button

Attachments (3)
  • ie7error.jpg (1.6 KB) - added by asprouse August 18, 2008 09:38PM UTC.
  • test-3260.html (0.6 KB) - added by dmethvin August 12, 2010 12:41AM UTC.
  • test.html (0.8 KB) - added by asprouse August 18, 2008 09:44PM UTC.
Change History (6)

Changed August 18, 2008 09:41PM UTC by asprouse comment:1

Here is a screenshot of the error in IE7:


Changed August 19, 2008 11:44AM UTC by flesler comment:2

cc: → flesler, asprouse
component: corefx

Changed August 12, 2010 12:41AM UTC by dmethvin comment:3

Attaching a test case with jQuery 1.4.2, which seems to work in IE8. Needs to be tested with IE7.

Changed October 25, 2010 06:55AM UTC by SlexAxton comment:4

keywords: → IE7, slide
milestone: 1.31.5
priority: majorlow
status: newopen

Let's test Dave's patch and see if we think it's something we can get in soon. Seems valid as an IE7 compatibility issue.

Changed April 17, 2011 07:26PM UTC by timmywil comment:5

milestone: →
resolution: → fixed
status: openclosed

I believe this has been fixed Feel free to reopen and provide an updated

test case if necessary.

Changed April 17, 2011 08:16PM UTC by timmywil comment:6

#6767 is a duplicate of this ticket.