#5691 closed bug (fixed)
wrong menu size calculation in webkit browsers
Reported by: | kaito | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.8.3 |
Component: | ui.autocomplete | Version: | 1.8.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
In all webkit-based browsers the menu size calculation seems to be wrong. Just test it at the autocomplete demo site with chrome or safari.
eg: In 'Default functionality' search for 'asp' and then delete one by one character and see the menu getting wider and wider.
Change History (10)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Same issue here. This can be reliably reproduced on any of the "remote" demos for autocomplete on the jqueryui website.
It happens if you begin typing, wait for a menu to popup, then continue typing or hit backspace.
To reproduce:
- Open Chrome or Safari
- Go to http://jqueryui.com/demos/autocomplete/#remote
- Type "ja"
- Wait for menu
- If chrome, type "y". If safari, hit backspace.
You'll see the menu expand way out to the right of the screen.
Tested in Safari 5 (windows) and chrome 5 & 6. Works find in IE/Firefox.
comment:3 Changed 13 years ago by
This is a CSS issue was introduced in the following commit: http://github.com/jquery/jquery-ui/commit/b7ad981e6965ecf92882b98ca99bb3108748ffe7
Removing the changes to the 'float' and 'width' properties in the context of an autocomplete resolves the issue.
comment:4 Changed 13 years ago by
I just removed the float, and that fixed it for me.. although IE acts a bit weird now.
comment:5 Changed 13 years ago by
This doesn't seem to be a CSS issue per-se, as the autocomplete sets a width as an inline style (maybe related to http://github.com/yacchatta/jquery-ui/commit/26d93a7eb69a9ee04919bdb33d27f5f76b66c93d). Likely the width calculation is flawed, for whatever reason, resulting in the bad calculation.
comment:6 Changed 13 years ago by
It's also questionable whether it makes sense to resize the menu all the time.
comment:7 Changed 13 years ago by
I can confirm that dmuir's solution worked for me as well.
While you are right joern that the style is set inline to a large px width, perhaps this calculation was caused by the faulty css?
comment:8 Changed 13 years ago by
Milestone: | TBD → 1.9 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed in a090faa by floating the menu.
comment:9 Changed 12 years ago by
Milestone: | 1.9 → 1.8.3 |
---|
comment:10 Changed 12 years ago by
Menu: float .ui-menu since all .ui-menu-item elements are floated. Fixes #5691 - wrong menu size calculation in webkit browsers (Autocomplete).
Changeset: a090faa833cf5b40105bb4aa74bca7ac39366fe9
hmm... without resetting the width of the ul in line 279 it seems to work perfectly in all browsers: