<select> does not scroll when css style applied

RESOLVED WORKSFORME

Status

()

P3
normal
RESOLVED WORKSFORME
19 years ago
18 years ago

People

(Reporter: bobj, Assigned: rods)

Tracking

({verifyme})

Trunk
All
Other
verifyme
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

19 years ago
Applying style to a <div class=...> which contained a <select ...> made
scrolling not work for the <select...>.  By removing the style from the <div>,
the <select ...> could then scroll.

Here are snippets from the OLD (non-scrolling)and the NEW (scrolling) HTML:

OLD:            <td height=25 colspan=2>
OLD:                                    <div class=normal>
OLD: <select class=pulldown tabindex="12" name="U2_COUNTRY" 
onChange="check_field('U2_COUNTRY')">

NEW:            <td height=25 colspan=2>
NEW:                                    <div>
NEW: <select class=pulldown tabindex="12" name="U2_COUNTRY" 
onChange="check_field('U2_COUNTRY')">

The normal style is declared in a .css file:
...
.normal {
        font-size: 12px;
        font-family : Arial, Helvetica, sans-serif;
        line-height : 15px;
        word-spacing : 1px;
        letter-spacing: -1;
}
...

(Putting this style in-line between <style> ... <style/> tags had no effect.)

See bug 32829 for a full description including .html and .css attachments.
(Bug 32829 is currently marked confidential because of the HTML that
revealed this problem is confidential until deployed. But a simpler test
case probably could be developed anyway.)

Comment 1

19 years ago
Created attachment 6929 [details]
testcase

Comment 2

19 years ago
It works for me on WinNT and Mac. My testcase implements the code extracted from 
bug 32829 except that the style has been put in-line (you said it had no effect). 
I also tried the original html and css files from 32829 and it worked for me: the 
pulldown menu can be scrolled.

Reassigned back to bobj to create a better testcase or close as WorksForMe.

Note: in the current implementation of dropdown lists, you must use the scrollbar 
to scroll - click and drag doesn't work - but that's another story.
Assignee: pierre → bobj
(Reporter)

Comment 3

19 years ago
Everything I tried was using Beta1 branch builds on Win95.
Has something changed on the trunk or is it a Win95 problem?

I tried your test case using build 2000032306 (which we put on the CDs) on
Win95.  It does the same thing -- clicking on the scroll bar or on the
scroll arrows, the select immediately collapses instead of scrolling.

All the commercial trunk builds I've tried haven't worked.  And it's too painful
to download a mozilla build over a phone line, so I'll try this again next
week when I'm in the office.
(Reporter)

Comment 4

19 years ago
BTW, I was able to find a workaround for Beta1 aby getting Netcenter to change
"<div class=normal>" to just "<div>" that contained the <select ...>.

Comment 5

19 years ago
It is not related to the presence or not of style. The problem is that some 
combinations of line-height and font-size make the dropdown list impossible to 
scroll using beta1 on WinNT, Win98 and Win95. As far as I could see, the 
font-size must be more than 1px smaller than the line-height. For instance, 
these work:
  line-height : 12px;      or     line-height : 16px; 
  font-size   :  9px;             font-size   : 14px;
but if you use 12px/10px or 16px/15px, it doesn't work.

The problem seems to have been fixed on the trunk.
Reassigned to rods to make sure that it's fixed.
I'm going to attach a testcase.
Assignee: bobj → rods

Comment 6

19 years ago
Created attachment 7010 [details]
testcase for font-size/line-height
(Assignee)

Comment 7

19 years ago
accepting for testing
Status: NEW → ASSIGNED
(Reporter)

Comment 8

19 years ago
I just tried this with a tip build: 2000032809 and it works for me.
I don't understand this comment relates with the original page:

     As far as I could see, the  font-size must be more than 1px smaller
     than the line-height.

because on the original page used
     line-height : 12px;
     font-size   : 15px;

Anyway I modifed pierre's test case to have 3 <select> with 3 different styles:
(1)  line-height : 12px;
     font-size   : 15px;
(2)  line-height : 12px;
     font-size   : 10px;
(3)  line-height : 16px;
     font-size   : 15px;

And these all work.  I'll attach the modified test page.


(Reporter)

Comment 9

19 years ago
Created attachment 7039 [details]
Updated test case w/3 styles
(Reporter)

Updated

19 years ago
Blocks: 32829
(Assignee)

Comment 10

19 years ago
These tests all seem to work fine in today's build. marking works for me
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → WORKSFORME

Comment 11

19 years ago
bobj- your original testcase contained the following style:
.normal {
        font-size: 12px;
        line-height : 15px;
}
.pulldown {
        font-size : 16px;
}
but since the DIV of class "normal" is parent of the SELECT of class "pulldown", 
the resulting style for "pulldown" is:
        line-height : 15px;
        font-size : 16px;
which causes the bug in the beta1 build because font-size is larger than line-
height. Your new testcase with 3 pairs of values fails with beta1 and works with 
the tips.

Comment 12

18 years ago
Adding 'verifyme' keyword
Keywords: verifyme
Netscape's standard compliance QA team reorganised itself once again, so taking 
remaining non-tables style bugs. Sorry about the spam. I tried to get this done 
directly at the database level, but apparently that is "not easy because of the 
shadow db", "plus it screws up the audit trail", so no can do...
QA Contact: chrisd → ian
You need to log in before you can comment on or make changes to this bug.