File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
packages/components/src/Tabs Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -143,10 +143,17 @@ export function Tabs({
143143 if ( _activeKey in refs . current && wrapperRef . current ) {
144144 const element = refs . current [ _activeKey ] ;
145145 const rect = element . getBoundingClientRect ( ) ;
146+
147+ const wrapperStyle = window . getComputedStyle ( wrapperRef . current ) ;
148+ const borderLeftWidth = parseFloat ( wrapperStyle . borderLeftWidth ) ;
149+
146150 setActivePosition ( {
147151 width : rect . width ,
148152 height : rect . height ,
149- translate : rect . x - wrapperRef . current . getBoundingClientRect ( ) . x - WRAPPER_PADDING ,
153+ translate :
154+ rect . x -
155+ ( wrapperRef . current . getBoundingClientRect ( ) . x + borderLeftWidth + 1 ) -
156+ WRAPPER_PADDING ,
150157 translateY : rect . y - wrapperRef . current . getBoundingClientRect ( ) . y - WRAPPER_PADDING ,
151158 } ) ;
152159
You can’t perform that action at this time.
0 commit comments