jcinfo-utils 1.0.31 → 1.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +7 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -175,10 +175,17 @@ function scrollToTop(smooth = false) {
175
175
  let el = document?.querySelector('main')
176
176
  if (!el) {
177
177
  el = document.body
178
+ if (process.env.NODE_ENV == 'development') {
179
+ console.log('scrollToTop: body')
180
+ }
178
181
  }
179
182
  if (el) {
183
+ if (process.env.NODE_ENV == 'development') {
184
+ console.log('scrollToTop: main')
185
+ }
180
186
  el.scrollTo({
181
187
  top: 0,
188
+ left: 0,
182
189
  behavior: smooth ? 'smooth' : 'auto',
183
190
  })
184
191
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jcinfo-utils",
3
- "version": "1.0.31",
3
+ "version": "1.0.32",
4
4
  "description": "Pacote de funções utilitárias",
5
5
  "main": "index.js",
6
6
  "type": "module",