mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-01 05:06:53 +08:00
fix(sheets): Attach sheets to the toolbar at correct offset
This commit is contained in:
parent
0174b4d20f
commit
f951d85f45
2 changed files with 6 additions and 2 deletions
|
@ -11,7 +11,7 @@
|
|||
"bugs": {
|
||||
"url": "https://github.com/nylas/N1/issues"
|
||||
},
|
||||
"electronVersion": "0.37.6",
|
||||
"electronVersion": "0.37.7",
|
||||
"dependencies": {
|
||||
"async": "^0.9",
|
||||
"atom-keymap": "^6.1.1",
|
||||
|
|
|
@ -198,7 +198,8 @@ class Toolbar extends React.Component
|
|||
return unless @mounted
|
||||
|
||||
# Find our item containers that are tied to specific columns
|
||||
columnToolbarEls = ReactDOM.findDOMNode(@).querySelectorAll('[data-column]')
|
||||
el = ReactDOM.findDOMNode(@)
|
||||
columnToolbarEls = el.querySelectorAll('[data-column]')
|
||||
|
||||
# Find the top sheet in the stack
|
||||
sheet = document.querySelectorAll("[name='Sheet']")[@props.depth]
|
||||
|
@ -215,6 +216,9 @@ class Toolbar extends React.Component
|
|||
columnToolbarEl.style.left = "#{columnEl.offsetLeft}px"
|
||||
columnToolbarEl.style.width = "#{columnEl.offsetWidth}px"
|
||||
|
||||
# Record our overall height for sheets
|
||||
remote.getCurrentWindow().setSheetOffset(el.clientHeight)
|
||||
|
||||
_onWindowResize: =>
|
||||
@recomputeLayout()
|
||||
|
||||
|
|
Loading…
Reference in a new issue