Opened 7 years ago
Last modified 4 years ago
#18239 new defect
[regression] Long TooltipDialogs get container scroll
Reported by: | Colin Snover | Owned by: | bill |
---|---|---|---|
Priority: | undecided | Milestone: | 1.15 |
Component: | Dijit | Version: | 1.9.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
#10631 added scrollbars for menus by making changes to dijit/popup. This has the side-effect of also incorrectly adding them to TooltipDialog? in a way where it causes the wrapper of the dialog to scroll, instead of the inner content of the dialog. Prior to #10631, a too-long TooltipDialog? would simply cause the page itself to scroll.
Test case, with workaround/“fix”:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Test</title> <link rel="stylesheet" href="dijit/themes/claro/claro.css"> </head> <body class="claro"> <script>var dojoConfig = { async: true };</script> <script src="dojo/dojo.js"></script> <script> require(['dijit/form/DropDownButton', 'dijit/TooltipDialog'], function (DropDownButton, TooltipDialog) { var dropDown = new TooltipDialog({ content: new Array(100).join('test<br>') }); var button = new DropDownButton({ label: 'hey', dropDown: dropDown, // workaround to restore pre-1.9 behaviour maxHeight: Infinity }); button.placeAt(document.body); button.startup(); }); </script> </body> </html>
Change History (3)
comment:2 Changed 5 years ago by
Milestone: | tbd → 1.12 |
---|
comment:3 Changed 4 years ago by
Milestone: | 1.13 → 1.15 |
---|
Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.
Note: See
TracTickets for help on using
tickets.
Interesting.
That change in behavior is actually an improvement when the page itself can't be scrolled (like http://downloads.dojotoolkit.org/release-1.10.0/dojo-release-1.10.0/dijit/themes/themeTester.html), but it would be better if the TooltipDialog? got an inner scrollbar (just for the content), rather than scrolling the TooltipDialog? itself.
This makes me regret [31001]. I don't remember why I didn't just encourage popups to have a
containerNode
<div> and then have dijit/popup set a height/width on that. Perhaps just because of the problem with menus where you would have a <div> enclosing a <table> and the <table> doesn't expand to the full width of the <div>.PS: As [31001] mentions, the hard part is scrollbars for menus, because they are
<table>
s.