Opened 12 years ago
Closed 12 years ago
#7819 closed bug (notabug)
positon() does not work when div contains multiple spans
Reported by: | JVerstry | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.position | Version: | 1.8.16 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Following a question I asked on StackOverflow (http://stackoverflow.com/questions/7922023/jquery-ui-position-issue-with-a-div-within-a-div-containing-spans), it seems like there is a bug in the position() method when trying to position a div containing spans, within another div.
If each spans is not followed by a <br /> (except for the last one), the position() method does not work. There is no error message thrown by FireBug and I a could not find any documentation related to this. Setting a value for collision does not help.
The SO question contains screenshots and code samples.
Change History (3)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
After discussions in the SO question, someone found out that the enclosing div MUST have an explicit height or width. This is not mentioned in the documentation.
comment:3 Changed 12 years ago by
Component: | ui.core → ui.position |
---|---|
Resolution: | → invalid |
Status: | new → closed |
That's because your elements are all floated, so they don't have the dimensions that you think they have.
I have create a code example at: http://jsfiddle.net/bHssw/.
In this example, even if I add a <br /> after each span, it does not solve the issue.