loleaflet/src/control/Control.Menubar.js | 8 ++++++++ loleaflet/src/control/Control.Scroll.js | 10 +++++++--- 2 files changed, 15 insertions(+), 3 deletions(-)
New commits: commit 76178f22e568c2603419bdebfe081bc8e4bbb076 Author: Pranav Kant <pran...@collabora.com> Date: Sun Jun 19 01:04:55 2016 +0530 loleaflet: bccu#1887: Enable keyevents on menubar Make it focusable. This also enables ESC key to reset the opened menu. Change-Id: Ia7be49af45b25ae7d29a5ba95b83591af0d82dca diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index f45664e..9bdfba6 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -178,6 +178,7 @@ L.Control.Menubar = L.Control.extend({ subIndicatorsPos: 'append', subIndicatorsText: '›' }); + $('#main-menu').attr('tabindex', 0); this._initialized = true; $('#main-menu').bind('select.smapi', {self: this}, this._onItemSelected); commit 3de264c3fdb6bced35eaaa2971f075d118ff0cb1 Author: Pranav Kant <pran...@collabora.com> Date: Sun Jun 19 01:04:47 2016 +0530 loleaflet: Hide its submenu when clicked over highlighted menu Change-Id: Id1249e5d4a0d2013e1dd2a5f8833b3b787b1a137 diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index a81452b..f45664e 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -182,6 +182,13 @@ L.Control.Menubar = L.Control.extend({ $('#main-menu').bind('select.smapi', {self: this}, this._onItemSelected); $('#main-menu').bind('beforeshow.smapi', {self: this}, this._beforeShow); + $('#main-menu').bind('click.smapi', {self: this}, this._onClicked); + }, + + _onClicked: function(e, menu) { + if ($(menu).hasClass('highlighted')) { + $('#main-menu').smartmenus('menuHideAll'); + } }, _beforeShow: function(e, menu) { commit 50a237dd294cd83633ab4965fdb04c1469b2f9b2 Author: Pranav Kant <pran...@collabora.com> Date: Fri Jun 17 10:00:12 2016 +0530 loleaflet: bccu#1867: Do not scroll first time after doc resizes This was removed in c7588f0e8c194539e65fb8858fae02522237170a in an effort to fix calc row/col offset where it must not be ignored to have aligned row/col offset without any side-effects that one can have in single-part documents like writer. Earlier approach using a timer of 200 ms for 'scroll ignore' also doesn't seem very effective, so change it to: ignoring the first 'whileScrolling' invocation. Change-Id: Ic3a6868a279fc200b8f9fee74bb40aebad5d9646 diff --git a/loleaflet/src/control/Control.Scroll.js b/loleaflet/src/control/Control.Scroll.js index 1ce203f..b5e6b1b 100644 --- a/loleaflet/src/control/Control.Scroll.js +++ b/loleaflet/src/control/Control.Scroll.js @@ -36,6 +36,7 @@ L.Control.Scroll = L.Control.extend({ _onScroll: function (e) { if (this._ignoreScroll) { + this._ignoreScroll = null; return; } if (this._prevScrollY === undefined) { @@ -113,10 +114,14 @@ L.Control.Scroll = L.Control.extend({ }, _onUpdateSize: function (e) { - this._ignoreScroll = true; + // for writer documents, ignore scroll while document size is being reduced + var prevDocY = parseFloat(L.DomUtil.getStyle(this._mockDoc, 'height')); + if (this._map.getDocType() === 'text' && e.y < prevDocY) { + this._ignoreScroll = true; + } + L.DomUtil.setStyle(this._mockDoc, 'width', e.x + 'px'); L.DomUtil.setStyle(this._mockDoc, 'height', e.y + 'px'); - this._ignoreScroll = null; }, _onUpdateScrollOffset: function (e) { commit be6acfcd4e0dd5830530e73b5261e03b4c9e9bf5 Author: Pranav Kant <pran...@collabora.com> Date: Fri Jun 17 09:18:26 2016 +0530 loleaflet: Remove superfluous call Option 'updateOnContentResize' is true by default, which means this method is called automatically when scroll container is resized, so no need to manually call it again. Change-Id: Ie80e90239752acb119e3a92c09a1f77dd61b2ad4 diff --git a/loleaflet/src/control/Control.Scroll.js b/loleaflet/src/control/Control.Scroll.js index 8cc7dcb..1ce203f 100644 --- a/loleaflet/src/control/Control.Scroll.js +++ b/loleaflet/src/control/Control.Scroll.js @@ -116,7 +116,6 @@ L.Control.Scroll = L.Control.extend({ this._ignoreScroll = true; L.DomUtil.setStyle(this._mockDoc, 'width', e.x + 'px'); L.DomUtil.setStyle(this._mockDoc, 'height', e.y + 'px'); - $('.scroll-container').mCustomScrollbar('update'); this._ignoreScroll = null; }, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits