IDEMPIERE-5296 Firefox 100: Horizontal scroll is broken for Grid with… (#1368)

* IDEMPIERE-5296 Firefox 100: Horizontal scroll is broken for Grid with Frozen

- disable use of Frozen column for Firefox

* IDEMPIERE-5296 Firefox 100: Horizontal scroll is broken for Grid with Frozen

- implement workaround from https://tracker.zkoss.org/browse/ZK-5159
This commit is contained in:
hengsin 2022-06-22 22:51:16 +08:00 committed by GitHub
parent a49e00520c
commit 417ef846a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 46 additions and 5 deletions

View File

@ -48,7 +48,7 @@ Copyright (C) 2007 Ashley G Ramdass (ADempiere WebUI).
<javascript-module name="jawwa.atmosphere" version="202205100600"/>
<javascript-module name="adempiere.local.storage" version="202205100600"/>
<javascript-moudle name="html2canvas" version="1.3.1"/>
<javascript-module name="org.idempiere.commons" version="202205100600"/>
<javascript-module name="org.idempiere.commons" version="202206201200"/>
<javascript-module name="jquery.maskedinput" version="1.4.1" />
<javascript-module name="photobooth" version="0.7-rsd3" />
<javascript-module name="chosenbox" version="202205100600"/>
@ -56,6 +56,6 @@ Copyright (C) 2007 Ashley G Ramdass (ADempiere WebUI).
<!-- this js module doesn't actually exists and it is here for default theme version -->
<!-- since loading of js module is on demand, it doesn't cause any error as long as you don't try to load it -->
<javascript-module name="idempiere.theme.default" version="202206021402" />
<javascript-module name="idempiere.theme.default" version="202206201200" />
</language>

View File

@ -548,7 +548,7 @@ public class GridView extends Vlayout implements EventListener<Event>, IdSpace,
//frozen not working well on tablet devices yet
//unlikely to be fixed since the working 'smooth scrolling frozen' is a zk ee only feature
if (!ClientInfo.isMobile() && !ClientInfo.isFirefox("100."))
if (!ClientInfo.isMobile())
{
Frozen frozen = new Frozen();
//freeze selection and indicator column

View File

@ -45,6 +45,42 @@ zk.afterLoad('zul.mesh', function() {
}
}
return result;
},
//workarond from https://tracker.zkoss.org/browse/ZK-5159
bind_: function () {
this.$supers(zul.mesh.Frozen, 'bind_', arguments);
var p = this.parent,
body = p.$n('body'),
foot = p.$n('foot');
if (p._nativebar) {
//B70-ZK-2130: No need to reset when beforeSize, ZK-343 with native bar works fine too.
zWatch.listen({onSize: this});
var scroll = this.$n('scrollX'),
scrollbarWidth = jq.scrollbarWidth();
if(scrollbarWidth == 0){
scrollbarWidth = 12;
}
// ZK-2583: native IE bug, add 1px in scroll div's height for workaround
this.$n().style.height = this.$n('cave').style.height = this.$n('right').style.height = scroll.style.height
= scroll.firstChild.style.height = jq.px0(zk.ie ? scrollbarWidth + 1 : scrollbarWidth);
p._currentLeft = 0;
this.domListen_(scroll, 'onScroll');
var head = p.$n('head');
if (head)
this.domListen_(head, 'onScroll', '_doHeadScroll');
} else {
// Bug ZK-2264
this._shallSyncScale = true;
}
// refix-ZK-3100455 : grid/listbox with frozen trigger "invalidate" should _syncFrozenNow
zWatch.listen({onResponse: this});
if (body)
jq(body).addClass('z-word-nowrap');
if (foot)
jq(foot).addClass('z-word-nowrap');
}
});

View File

@ -1,2 +1,7 @@
<%@ page contentType="text/css;charset=UTF-8" %>
<%@ taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c" %>
<%-- workaround for ZK-5159 --%>
.z-frozen-body, .z-frozen-inner {
background-color: white;
}