Results 1 to 6 of 6

Thread: IE mouse dragging in iframe

  1. #1
    Join Date
    Jan 2007
    Location
    Charlotte, NC
    Posts
    82
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question IE mouse dragging in iframe

    So I'm building a site with an iframe. When I view the site in IE6 & 7 I can click and drag my left mouse button inside the iframe to the right almost like scrolling horizontally moving the inner page to the left and right.

    I have tried everything to overcome this little bug by setting positions to fixed, messing around with widths of the inner pages and the main page iframe but nothing works.

    This does not happen in Firefox. So I'm assuming it's an IE only bug and have searched the interweb for a solution but haven't found anything.

    So my question to you is this: Has anybody ever come across this before? Is there a solution?

  2. #2
    Join Date
    Feb 2007
    Posts
    293
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Can you provide a URL to show the problem?

  3. #3
    Join Date
    Jan 2007
    Location
    Charlotte, NC
    Posts
    82
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    What I'm working on is not online but here is something that shows the same problem that I created rather quickly:

    http://www.ja-miller.com/iframe.html

    edit:// To show the problem I'm talking about, must be viewed in IE

  4. #4
    Join Date
    Feb 2007
    Posts
    293
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I don't see it in IE7 or IE6. Tried it with a trackball mouse and a regular one. Sorry. Anyone else?

  5. #5
    Join Date
    Jan 2007
    Location
    Charlotte, NC
    Posts
    82
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    You highlighted the word "TEST" and dragged your mouse to the left and right while still holding the button down and you didn't see it? For me, in IE7, the text, "TEST" moves to the left and right.

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    It is the width of the iframe's border, 2px on either side. In IE this cuts into the the width of the display area by a total of 4px. You can make up these 4 pixels in a number of ways. One is to make the iframe's width be 204px. Another would be to set the iframe's frameborder attribute to 0. You could narrow the test.html's body to 196px. You could probably do other things.

    Notes: This is a common problem in IE. It is often known as the box model bug. IE 7 supposedly has fixed many of the bugs in IE, but apparently not the box model bug, at least not as it applies to iframes.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •