All users were logged out of Bugzilla on October 13th, 2018

Part of <select> popup is off-screen if <select> is near the edge of the screen

NEW
Unassigned

Status

()

5 years ago
2 years ago

People

(Reporter: firefox, Unassigned)

Tracking

({reproducible, testcase})

Trunk
reproducible, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
Created attachment 763595 [details]
drop-list error.jpg

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36

Steps to reproduce:

When the SELECT element is close to the right of the physical screen, it is displayed partly off screen. See screenshot.


Actual results:

When the SELECT element is close to the bottom of the physical screen, it is displayed partly off screen. See screenshot.


Expected results:

It should be displayed.
(Reporter)

Comment 1

5 years ago
Created attachment 763599 [details]
Correct selecting drop-list

Updated

5 years ago
Group: core-security

Comment 2

5 years ago
Reporter, could you please provide a link to a public page that has this issue?
Flags: needinfo?(firefox)
(Reporter)

Comment 3

5 years ago
(In reply to Alexandra Lucinet [QA] from comment #2)
> Reporter, could you please provide a link to a public page that has this
> issue?

http://hobby.dn.ua/123/address_book.html
Flags: needinfo?(firefox)
(Reporter)

Comment 4

5 years ago
(In reply to firefox from comment #3)
> (In reply to Alexandra Lucinet [QA] from comment #2)
> > Reporter, could you please provide a link to a public page that has this
> > issue?
> 
> http://hobby.dn.ua/123/address_book.html

select from "Warehouse" drop-list

Updated

5 years ago
Status: UNCONFIRMED → NEW
Component: Untriaged → Layout: Form Controls
Ever confirmed: true
Product: Firefox → Core
Summary: Selecting drop-list error → Part of <select> popup is off-screen if <select> is near the edge of the screen

Comment 5

5 years ago
Mozilla/5.0 (Windows NT 6.1; rv:22.0) Gecko/20100101 Firefox/22.0
Mozilla/5.0 (Windows NT 6.1; rv:23.0) Gecko/20100101 Firefox/23.0
Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20130718 Firefox/24.0
Mozilla/5.0 (Windows NT 6.1; rv:25.0) Gecko/20130718 Firefox/25.0

It works for me with Firefox 22.0 (Build ID: 20130618035212), Firefox 23 beta 6 (Build ID: 20130715155216), Aurora 24.a02 (Build ID: 20130718004004) and Nightly 25.0a1 (Build ID: 20130718030201): when I resize the window, the Warehouse drop-down list is displayed entirely, but off screen. I've encountered the same behavior with Opera and Chrome.

Reporter, is it still an issue for you with the latest builds?

Updated

5 years ago
Flags: needinfo?(firefox)

Updated

4 years ago
Duplicate of this bug: 1094660

Comment 7

4 years ago
Yes, this is still current. On Windows (steps courtesy of the dupe):

Open your browser to [maximized mode]
Visit https://bugzilla.mozilla.org/page.cgi?id=productdashboard.html

Through any inspector (embedded or Firebug), set the following css styles:

select[name="product"] {
    width: 90px;
    float: right !important;
}

then click the product selector which is now on the far right of the screen.

The right side of the dropdown is displayed offscreen.

Neil, do you know anything about this code, and/or do you know someone who does?
Flags: needinfo?(firefox) → needinfo?(enndeakin)
Keywords: reproducible, testcase
Version: 21 Branch → Trunk

Comment 8

4 years ago
I don't. Might ask mats about this though, I think.
Flags: needinfo?(enndeakin) → needinfo?(mats)
We don't have any code that adjusts the x-offset of the dropdown menu to try to keep it
inside the screen edges horizontally (we do it vertically though).  Adding that functionality
seems like a reasonable enhancement request though.
Flags: needinfo?(mats)
OS: Windows 7 → All
Hardware: x86_64 → All

Updated

4 years ago
Duplicate of this bug: 1110072

Comment 11

4 years ago
Can anyone give me the info on where is the code for this located? I want to take a look. (and possibly modify, at least for myself).
Flags: needinfo?(mats)
GetAvailableDropdownSpace() calculates the available space above / below the contol.
It might be possible to extend to also calculate available space to the left / right.
http://mxr.mozilla.org/mozilla-central/source/layout/forms/nsComboboxControlFrame.cpp#546

Near the end of AbsolutelyPositionDropDown() there's some code that shifts the menu
horizontally for RTL.  That's probably a good place to take the available left / right
space into account.
http://mxr.mozilla.org/mozilla-central/source/layout/forms/nsComboboxControlFrame.cpp#604
Flags: needinfo?(mats)

Comment 13

4 years ago
(In reply to Mats Palmgren (:mats) from comment #12)
> GetAvailableDropdownSpace() calculates the available space above / below the
> contol.
> It might be possible to extend to also calculate available space to the left
> / right.
> http://mxr.mozilla.org/mozilla-central/source/layout/forms/
> nsComboboxControlFrame.cpp#546
> 
> Near the end of AbsolutelyPositionDropDown() there's some code that shifts
> the menu
> horizontally for RTL.  That's probably a good place to take the available
> left / right
> space into account.
> http://mxr.mozilla.org/mozilla-central/source/layout/forms/
> nsComboboxControlFrame.cpp#604

Thanks for the info. I've another query though, Do we have any code that returns the width of th control (combobox in this case). I was looking through the links provided and could not find/implement the "width" equivalent of "GetHeightOfARow" . If there is some code available to do that. Can you please point me to the code. I am sorry I couldn't understand much source codes and search.
I think you can use GetRect() here to get the position and size of the nsComboboxControlFrame.

Comment 15

4 years ago
This looks to be solved when E10 is enabled. (i.e., in Nightly)

The UI is a bit different (and nice) though. Does this mean this will no longer be any bug in the near future?

And Is there any Code documentation that I could possibly read and figure out about different functions?
Flags: needinfo?(mats)
(In reply to nootan.ghimire from comment #15)
> Does this mean this will no
> longer be any bug in the near future?

Yeah, perhaps this isn't worth fixing for non-e10s.  There are lot's of other
bugs to work on if you want to, see:
https://developer.mozilla.org/en/docs/Introduction#Step_2_-_Find_something_to_work_on

> And Is there any Code documentation that I could possibly read and figure
> out about different functions?

For Layout, the most relevant documentation is in the header files under layout/ .
Feel free to ask in #developers or #layout if you have questions on the code.
Flags: needinfo?(mats)

Updated

2 years ago
Duplicate of this bug: 1308852

Comment 18

2 years ago
Any update on this?
As you see this still a problem and e10 is still not available for most of the users I guess (at least for me it is deactivated because I have Add-ons installed...).
You need to log in before you can comment on or make changes to this bug.