angular-strap icon indicating copy to clipboard operation
angular-strap copied to clipboard

delay object not parsed correct

Open eranaorato opened this issue 12 years ago • 2 comments

in popover/tooltip: I find out that passing data-delay="{show: 500, hide: 100}" is not working. looks like the bug is line 3128: if (options.delay && angular.isString(options.delay)) { options.delay = parseFloat(options.delay); } options.delay is a string with the value "{show: 500, hide: 100}". need to add JSON.parse(options.delay) with try catch...

eranaorato avatar May 25 '14 13:05 eranaorato

in tooltip.js, I would have change line 40 to: try { options.delay = JSON.parse(options.delay); } catch (e) { options.delay = parseFloat(options.delay); } changing the document to show this example: data-delay='{"show":500, "hide":100}' (exact syntax is important for native JSON.parse to work)

eranaorato avatar May 26 '14 08:05 eranaorato

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 26 '19 17:01 lock[bot]