admin管理员组文章数量:1401122
I am using a slick carousel in a web page to pass through form data and info.
However I need to be able to select text inside the carousel. I thought that by setting draggable to false I would be able to select text, but the cursor shape changes to a text cursor but I still can not select text.
Is there a way around it?
I am configuring like this:
$('.carousel').slick({
prevArrow: '.btn-prev-cand',
nextArrow: '.btn-next-cand',
dots: false,
speed: 500,
infinite: true,
accessibility: true,
adaptiveHeight: false,
arrows: true,
centerMode: false,
variableWidth: false,
draggable: false,
swipeToSlide: false
});
I am using a slick carousel in a web page to pass through form data and info.
However I need to be able to select text inside the carousel. I thought that by setting draggable to false I would be able to select text, but the cursor shape changes to a text cursor but I still can not select text.
Is there a way around it?
I am configuring like this:
$('.carousel').slick({
prevArrow: '.btn-prev-cand',
nextArrow: '.btn-next-cand',
dots: false,
speed: 500,
infinite: true,
accessibility: true,
adaptiveHeight: false,
arrows: true,
centerMode: false,
variableWidth: false,
draggable: false,
swipeToSlide: false
});
Share
Improve this question
edited Jan 4, 2017 at 23:21
br3t
1,6582 gold badges21 silver badges28 bronze badges
asked Jul 7, 2016 at 16:24
dabichodabicho
3934 silver badges19 bronze badges
3 Answers
Reset to default 7Try to override this in css
.slick-slider {
-webkit-user-select: text;
-khtml-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
}
.slick-list.draggable {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
The problem that you described is a known issue - Selecting/Highlighting text #826
Try to put the setting "swipe" to false to disable the swiping and see the text cursor.
Colleague Martin's answer is great, but at the moment the text feature is supported in browsers, so there is no need at all to use moz webkit o
https://developer.mozilla/en-US/docs/Web/CSS/user-select#browser_patibility
It is enough just to write
.slick-list.draggable
{
user-select: text;
}
Also, there is no need to write
.slick-list.draggable {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
It is enough just to write the above code
本文标签: javascriptjquery slick carousel copypasteStack Overflow
版权声明:本文标题:javascript - jquery slick carousel copypaste - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744303497a2599696.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论