Akryum / Akryum/floating-vue

`resize-observer` div doesn't have the data attribute

Đang mở
#1,041 1 bình luận 2 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
3.5k
Fork
341
Merge trung bình
14 phút
Pull request đã merge (30 ngày)
8

Mô tả

```vue






import { Dropdown } from 'floating-vue';
import 'floating-vue/dist/style.css';

```

For this component using in two different pages. For first page, the resize-observer class has the id generated on it.

> ![Screenshot 2024-06-14 at 4 10 15 PM](https://github.com/Akryum/floating-vue/assets/14058003/7362c4e4-8a2b-4c37-a32e-aef033a79523)

But on a second page i.e a new route. The id isn't attached on the resize-observer

> ![Screenshot 2024-06-14 at 4 11 36 PM](https://github.com/Akryum/floating-vue/assets/14058003/c7e960cb-cbfa-4717-b846-c6474c6d881b)

Why is the id important?

Because the base styles `import 'floating-vue/dist/style.css'` apply some styles to the `resize-observor` based on the data attribute, which is crucial for positioning of the dropdown.

```css
.resize-observer[data-v-b329ee4c]{position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%;border:none;background-color:transparent;pointer-events:none;display:block;overflow:hidden;opacity:0}
```

https://unpkg.com/floating-vue@2.0.0/dist/style.css

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.