File tree Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -265,7 +265,11 @@ html.y #tth {
265
265
box-shadow : 0 .3em 3em rgba (0 , 0 , 0 , 0.5 );
266
266
max-width : 50em ;
267
267
max-height : 30em ;
268
- overflow : auto;
268
+ overflow-x : auto;
269
+ overflow-y : scroll;
270
+ }
271
+ # modalc .yk {
272
+ overflow-y : auto;
269
273
}
270
274
# modalc td {
271
275
text-align : unset;
Original file line number Diff line number Diff line change @@ -1536,6 +1536,7 @@ var modal = (function () {
1536
1536
var r = { } ,
1537
1537
q = [ ] ,
1538
1538
o = null ,
1539
+ scrolling = null ,
1539
1540
cb_up = null ,
1540
1541
cb_ok = null ,
1541
1542
cb_ng = null ,
@@ -1579,13 +1580,16 @@ var modal = (function () {
1579
1580
1580
1581
document . addEventListener ( 'focus' , onfocus ) ;
1581
1582
document . addEventListener ( 'selectionchange' , onselch ) ;
1583
+ timer . add ( scrollchk , 1 ) ;
1582
1584
timer . add ( onfocus ) ;
1583
1585
if ( cb_up )
1584
1586
setTimeout ( cb_up , 1 ) ;
1585
1587
} ;
1586
1588
1587
1589
r . hide = function ( ) {
1588
1590
timer . rm ( onfocus ) ;
1591
+ timer . rm ( scrollchk ) ;
1592
+ scrolling = null ;
1589
1593
try {
1590
1594
ebi ( 'modal-ok' ) . removeEventListener ( 'blur' , onblur ) ;
1591
1595
}
@@ -1604,13 +1608,28 @@ var modal = (function () {
1604
1608
r . hide ( ) ;
1605
1609
if ( cb_ok )
1606
1610
cb_ok ( v ) ;
1607
- }
1611
+ } ;
1608
1612
var ng = function ( e ) {
1609
1613
ev ( e ) ;
1610
1614
r . hide ( ) ;
1611
1615
if ( cb_ng )
1612
1616
cb_ng ( null ) ;
1613
- }
1617
+ } ;
1618
+
1619
+ var scrollchk = function ( ) {
1620
+ if ( scrolling === true )
1621
+ return ;
1622
+
1623
+ var o = ebi ( 'modalc' ) ,
1624
+ vis = o . offsetHeight ,
1625
+ all = o . scrollHeight ,
1626
+ nsc = 8 + vis < all ;
1627
+
1628
+ if ( scrolling !== nsc )
1629
+ clmod ( o , 'yk' , ! nsc ) ;
1630
+
1631
+ scrolling = nsc ;
1632
+ } ;
1614
1633
1615
1634
var onselch = function ( ) {
1616
1635
try {
You can’t perform that action at this time.
0 commit comments