@humandialog/forms.svelte 1.7.5 → 1.7.6

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.
@@ -43,6 +43,7 @@
43
43
  return idx < entriesNo-maxEntriesNo
44
44
  }
45
45
 
46
+ let containerElement
46
47
  let scrollableElement
47
48
  /*let isScrolling = false
48
49
  let startScrollLeft = 0
@@ -84,14 +85,21 @@
84
85
  const elementsNo = pathElements.length
85
86
  if(elementsNo > 0)
86
87
  {
87
- const lastElement = pathElements[elementsNo-1]
88
- lastElement.scrollIntoView({ container: "nearest"})
88
+ // container: "nearest" not supported on iOS and mobile FF
89
+ //const lastElement = pathElements[elementsNo-1]
90
+ //lastElement.scrollIntoView({ container: "nearest"})
91
+
92
+ const containerRect = containerElement.getBoundingClientRect()
93
+ const wholeWidth = containerElement.scrollWidth
94
+ const visibleWidth = containerRect.width
95
+ containerElement.scrollLeft = wholeWidth - visibleWidth
96
+
89
97
  }
90
98
  })
91
99
 
92
100
  </script>
93
101
 
94
- <nav class="{userClass} w-full sm:w-fit sm:max-w-full overflow-x-auto sm:overflow-x-hidden" aria-label="Breadcrumb">
102
+ <nav class="{userClass} w-full sm:w-fit sm:max-w-full overflow-x-auto sm:overflow-x-hidden" aria-label="Breadcrumb" bind:this={containerElement}>
95
103
  <ol class="flex items-center space-x-1 md:space-x-2 rtl:space-x-reverse flex-nowrap min-h-[1.25rem]" bind:this={scrollableElement}>
96
104
 
97
105
  {#if (segments && segments.length > 0)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humandialog/forms.svelte",
3
- "version": "1.7.5",
3
+ "version": "1.7.6",
4
4
  "description": "Basic Svelte UI components for Object Reef applications",
5
5
  "devDependencies": {
6
6
  "@playwright/test": "^1.28.1",