Search and Top Navigation
#6234 closed bug (wontfix)
Opened October 27, 2010 12:45PM UTC
Closed September 16, 2011 06:02PM UTC
Position: Elements with top or left set to "auto" are positioned incorrectly in Opera
Reported by: | neverov | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.position | Version: | 1.8.5 |
Keywords: | Opera | Cc: | dmitry.neverov@gmail.com |
Blocked by: | Blocking: |
Description
It seems that function position() from position.js works incorrectly in
Opera 10 (10.63 under linux and 10.53 under windows).
Test to reproduce:
<html> <head> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js"></script> </head> <body> <div style="margin-left: 100px; margin-top: 200px; border: 1px solid blue; width: 200px;"> <input type="text" id="my_input" value="test"/> </div> <script type="text/javascript"> var options = {my: "left top", at: "left bottom", collision: "none"}; $('<div style="border: 1px solid black; width: 100px;">test</div>') .appendTo('body') .show() .position($.extend({of: $('#my_input')}, options)); </script> </body> </html>
The div with text 'test' should be placed right under the input field.
In Opera it is placed far below the input field.
A script in the test emulates functionality of autocomplete widget,
which also does not work properly in Opera (autocompletion's <ul> placed
in the left top corner of document, not under the input field).
Attachments (1)
Change History (12)
Changed October 27, 2010 12:55PM UTC by comment:1
Changed October 27, 2010 01:26PM UTC by comment:2
resolution: | → worksforme |
---|---|
status: | new → closed |
I'm getting the correct results in Opera 10.63.
Changed October 28, 2010 07:51AM UTC by comment:3
resolution: | worksforme |
---|---|
status: | closed → reopened |
I have this reproducing: see attached sample_opera_10.63.png which is the provided sample HTML opened in Opera 10.63 and also in FireFox as a comparison.
Changed October 28, 2010 12:15PM UTC by comment:4
milestone: | TBD → 1.9 |
---|
I just confirmed that I am seeing exactly what's in your screenshot. I have no idea what was going on yesterday, I was getting a different result, but it was consistent across all browsers.
Changed October 28, 2010 12:19PM UTC by comment:5
Scott, it seems like commit eab0a6dac13b642a870747249a360bdddb39da99 contains a fix for the issue.
Changed October 28, 2010 12:41PM UTC by comment:6
Replying to [comment:5 neverov]:
Scott, it seems like commit eab0a6dac13b642a870747249a360bdddb39da99 contains a fix for the issue.
That's unrelated; there's no confusion about whether or not we're a window in this case.
Changed October 28, 2010 12:42PM UTC by comment:7
This is a bug in jQuery core where .offset() thinks that the element being positioned has a top of "221px" instead of "auto".
Changed October 28, 2010 01:02PM UTC by comment:8
Core ticket: http://bugs.jquery.com/ticket/7343
Changed October 28, 2010 01:39PM UTC by comment:9
Scott, thanks for investigation.
While debugging page with autocomplete widget I noticed that
targetElemin jquery.ui.position() contains field 'document' in
Opera and doesn't contain it in other browsers. So in all browsers
autocomplete's <ul> was positioned right under input element and in
Opera - in the top left corner of the page. In the commit
a0847f3a08dfc259d8ba7f6ba7da16653cf15183 you removed check for the
field 'document' and now <ul/> is placed correctly. Just FYI.
Changed October 28, 2010 02:07PM UTC by comment:10
Thanks for the info neverov.
Changed March 21, 2011 04:56PM UTC by comment:11
summary: | Bug in position.js with Opera 10.63 → Position: Elements with top or left set to "auto" are positioned incorrectly in Opera |
---|
Changed September 16, 2011 06:02PM UTC by comment:12
resolution: | → wontfix |
---|---|
status: | reopened → closed |
This is fixed in newer versions of Opera and we no longer support the versions that have the broken behavior.
I checked it again and it turns out that plain autocomplete works fine, but problem with position exists anyway.