admin管理员组文章数量:1236630
I have created a hybrid app in which I used bxslider and placed div inside it as follow,
<div class="bxslider">
<div id="chart1" style="text-align:center">
<span id="barChartTitle">Bar Chart</span>
<svg id="chartCanvas" class="margintop40"></svg>
</div>
<div id="chart2" style="text-align:center">
<span id="trendChartTitle">Trend Chart</span>
<svg id="chartCanvas" class="margintop40"></svg>
</div>
</div>
when ever I make a touch over the bxslider in the html view I receive the following error,
jquery.bxslider.js:1109 Uncaught DOMException: Failed to execute 'setPointerCapture' on 'Element': InvalidPointerId
at HTMLDivElement.onTouchStart (http://localhost:8100/js/jquery.bxslider.js:1109:34)
at HTMLDivElement.dispatch (http://localhost:8100/js/jquery-3.1.1.min.js:3:10315)
at HTMLDivElement.q.handle (http://localhost:8100/js/jquery-3.1.1.min.js:3:8342)
onTouchStart @ jquery.bxslider.js:1109
dispatch @ jquery-3.1.1.min.js:3
q.handle @ jquery-3.1.1.min.js:3
jquery.bxslider.js:1234 Uncaught DOMException: Failed to execute 'releasePointerCapture' on 'Element': InvalidPointerId
at HTMLDivElement.onTouchEnd (http://localhost:8100/js/jquery.bxslider.js:1234:32)
at HTMLDivElement.dispatch (http://localhost:8100/js/jquery-3.1.1.min.js:3:10315)
at HTMLDivElement.q.handle (http://localhost:8100/js/jquery-3.1.1.min.js:3:8342)
I searched a lot but couldn't find out why the error occurs, please help.
I have created a hybrid app in which I used bxslider and placed div inside it as follow,
<div class="bxslider">
<div id="chart1" style="text-align:center">
<span id="barChartTitle">Bar Chart</span>
<svg id="chartCanvas" class="margintop40"></svg>
</div>
<div id="chart2" style="text-align:center">
<span id="trendChartTitle">Trend Chart</span>
<svg id="chartCanvas" class="margintop40"></svg>
</div>
</div>
when ever I make a touch over the bxslider in the html view I receive the following error,
jquery.bxslider.js:1109 Uncaught DOMException: Failed to execute 'setPointerCapture' on 'Element': InvalidPointerId
at HTMLDivElement.onTouchStart (http://localhost:8100/js/jquery.bxslider.js:1109:34)
at HTMLDivElement.dispatch (http://localhost:8100/js/jquery-3.1.1.min.js:3:10315)
at HTMLDivElement.q.handle (http://localhost:8100/js/jquery-3.1.1.min.js:3:8342)
onTouchStart @ jquery.bxslider.js:1109
dispatch @ jquery-3.1.1.min.js:3
q.handle @ jquery-3.1.1.min.js:3
jquery.bxslider.js:1234 Uncaught DOMException: Failed to execute 'releasePointerCapture' on 'Element': InvalidPointerId
at HTMLDivElement.onTouchEnd (http://localhost:8100/js/jquery.bxslider.js:1234:32)
at HTMLDivElement.dispatch (http://localhost:8100/js/jquery-3.1.1.min.js:3:10315)
at HTMLDivElement.q.handle (http://localhost:8100/js/jquery-3.1.1.min.js:3:8342)
I searched a lot but couldn't find out why the error occurs, please help.
Share Improve this question asked Jan 9, 2017 at 4:40 SelvaSelva 1231 gold badge1 silver badge12 bronze badges 3- I have the same issue. My Bxslider galleries were working fine till I tested the other day and started giving me this error. Interestingly the error occurs only on Android devices and not on the emulator. – Daniela Commented Jan 19, 2017 at 13:14
- I'm developing a hybrid app , so while testing the app in chrom browser using simulator I found this errors in console, this error occur if I make any click on the Bxslider. – Selva Commented Jan 20, 2017 at 9:32
- Have you found a solution? I'm stuck as no other slides integrates as neatly as bxslider. – Daniela Commented Feb 1, 2017 at 14:59
2 Answers
Reset to default 11Here is a workaround that works. Use this snippet of code:
var chromePointerEvents = typeof PointerEvent === 'function'; if (chromePointerEvents) { if (orig.pointerId === undefined) { return; } }
Insert after:
touchPoints = (typeof orig.changedTouches !== 'undefined') ? orig.changedTouches : [orig];
of file jquery.bxslider.js
More info here read simplicitytrade answer on Github.
why don't you try this current version?
<script src="https://cdnjs.cloudflare.com/ajax/libs/bxslider/4.2.15/jquery.bxslider.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/bxslider/4.2.15/jquery.bxslider.min.css" rel="stylesheet" />
本文标签:
版权声明:本文标题:javascript - DOMException failed to execute 'setPointerCapture' on 'Element' and 'releas 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1739500126a2166009.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论