mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-17 02:17:49 +00:00
Fix AB UX bugs
This commit is contained in:
parent
d81da27adc
commit
c17c002267
3 changed files with 13 additions and 1 deletions
web-frontend/modules/builder/components
|
@ -224,7 +224,15 @@ export default {
|
|||
*/
|
||||
isSelected(newValue, old) {
|
||||
if (newValue && !old) {
|
||||
this.$el.scrollIntoView({ behavior: 'smooth', block: 'center' })
|
||||
const rect = this.$el.getBoundingClientRect()
|
||||
const isTopVisible =
|
||||
rect.top >= 0 &&
|
||||
rect.top <=
|
||||
(window.innerHeight || document.documentElement.clientHeight)
|
||||
|
||||
if (!isTopVisible) {
|
||||
this.$el.scrollIntoView({ behavior: 'smooth', block: 'start' })
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
|
|
|
@ -38,6 +38,9 @@ export default {
|
|||
name: 'PageElement',
|
||||
mixins: [applicationContextMixin],
|
||||
inject: ['builder', 'page', 'mode'],
|
||||
provide() {
|
||||
return { mode: this.elementMode }
|
||||
},
|
||||
props: {
|
||||
element: {
|
||||
type: Object,
|
||||
|
|
|
@ -35,6 +35,7 @@ export default {
|
|||
page: this.page,
|
||||
mode,
|
||||
formulaComponent: ApplicationBuilderFormulaInputGroup,
|
||||
applicationContext: { builder: this.builder, page: this.page, mode },
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
|
Loading…
Add table
Reference in a new issue