- From: <bugzilla@jessica.w3.org>
- Date: Sat, 07 May 2011 07:24:10 +0000
- To: public-html-bugzilla@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=12245 --- Comment #22 from Silvia Pfeiffer <silviapfeiffer1@gmail.com> 2011-05-07 07:24:08 UTC --- (In reply to comment #21) > (In reply to comment #20) > > (In reply to comment #19) > > > > http://dojotoolkit.org/reference-guide/dijit/form/Select.html > > This doesn't actually select the number of items displayed, but rather limits > the size in pixels. That sounds like something better done using CSS. Through the size in pixels it also limits the number of items displayed, when it actually snaps to the height of the closest item through limiting that size. That's actually what I'm after. We can solve it through CSS, but it seems to me that the attribute @size which already exists would already be the right means to solve the problem. A drop-down's height is not generally defined by the height of the number of its entries but by the height it takes up in the flow of the page (without being dropped down). So, defining a height through CSS seems the wrong approach. It's the number of items that are displayed that defines the height of the drop-down. > > > Why do you want web applications to behave differently > > > from desktop apps? People generally aim for the opposite. > > > > I don't want HTML to work differently to desktop apps. Desktop applications > > allow me to restrict the length of the drop-down. > > Sure, but they don't generally limit the size to that of a contained widget, > right? No. And again, that's not what I'm after. I want a means to be able to set the height from JavaScript. I can already calculate how much space I have available through other means and if I want to stay within the height of a video element or an iframe or whatever, I have that height. I also have the height of each entry in the drop-down. So, if I can tell the browser how many items I want to display maximum, then I can limit the size to whatever I need. > > > Also, if you need for the dropdown to stay within a given box (such as the box > > > occupied by a <video>), then @size isn't enough since you also need to be able > > > to specify if the dropdown opens upwards or downwards. > > > > That would be an additional parameter that I cannot currently control and it > > might be nice to add that, too. But it's not what this bug is about. > > Well, if what this bug is about doesn't solve your use case then it seems like > it should simply be WONTFIXed. That is why it's better to file bugs on problems > rather than suggested solutions. I don't actually have a problem with the dropdown going upwards or downwards, which is why this bug is not about that. I've tried to explain the problem that I have as well as I could: namely that I cannot control the height of the drop-down box item list. I'm sorry if I failed. I also pointed to many other people having the same problem, particularly that first stackoverflow article. I don't know how else I can describe the problem. You really have to try to do it to understand the issue. > > > > Also, what do you expect to happen if the browser window is part-way off the > > > screen, such that the box that you expect the dropdown to render in would be > > > partly off screen? > > > > I don't want the browser to behave differently when rendering the drop-down > > (e.g. Firefox continues to render it when half off screen - that's fine). I > > only want to be able to tell it the maximum length of the drop-down rather than > > being restricted to whichever choice the browser implementers made. > > But then it might not stay inside the box that the video is occupying, which > seemed to be what you wanted? If I tell it to display a maximum number of items, it will, since I have calculated that number of items from the available space. > I'm still confused as to why you are wanting to do all this. However if we > think about it in terms of simply wanting greater control of the style in which > the dropdown is displayed, then it seems like CSS is the right solution. > Something like a pseudo-element which represents the dropdown and on which you > could set things like border, width and height. > > Would that solve your use cases? How would that interact with @size? -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
Received on Saturday, 7 May 2011 07:24:12 UTC