ng-repeat not updating in Chrome - javascript

I am currently to implement a small drag and drop ranking question with angular. Everything seems to be working fine except in Chrome where the labels for the ranking question aren't updating correctly.
I have recreated the problem in plunker. To recreate the problem drag all options into the drop area (the grey bit) and then switch the first with the second place. Now the first two items should display the same $index and label when doing this in Chrome.
When I switch to another tab and come back to the page it has updated correctly. It looks like it just isn't repainting for some reason.
I had a look in the model with Batarang and everything looks correct in there. I have run an additional $digest cycle by hand to see if there was a problem there, but it seemed fine.
The issue seems to only affect Chrome for some reason. If I recreate it on Firefox it works fine.

I've been recently working on one old project - it was using angular 1.2.6. And I met same issue.
Updating to version 1.2.29 helped me.
I know it's a little bit late but still may help to somebody :)

Related

Bewildering D3 behaviour - can't select text after zooming on map visualisation

I've been working on making a map related visualisation in D3 for a site that for historical reasons is stuck using some old versions of jQuery, and I've come across a weird bug when implementing drag behaviour on the map.
I've extracted the D3 code, and put it onto a gist listed below, and been able to replicate the strange behaviour, which you can trigger by:
Try loading the page below
Clicking on a country
Trying to select some text
I can't seem to select text after I've zoomed into a country, and I suspect it's down to line 130 in the d3_map.js file
The problem gist
The gist is here:
https://gist.github.com/mrchrisadams/89d053977513e6042adf
The rendered gist on http://bl.ocks.org, is here:
http://bl.ocks.org/mrchrisadams/89d053977513e6042adf
On the strange mismatch of javascript libraries
It's strange to see such an old version of jQuery, I know. I'm unable to change it without breaking other functinality on the site, which is why we're stuck with the old library.
Why is this happening, and how do I reinstate normal text selection again?
I'm utterly stumped as to why triggering a zoom knocks out the ability to select text, and I'd welcome any pointers, because I'm somewhat at a loss now.
Oh well, fingers crossed...

Shareaholic Social Bookmarking Errors

I've used shareaholic in the past and found it pretty good but they must have recently changed their formats which look great but are not functioning properly on my website.
The problems are:
The bookmarks are only showing the first row (not clearing the top row to show the second)
It's adding a background color to all of my links
Any ideas what the problem is and solutions?
I have the exact same problem..... I think Shareaholic is going down the toilet... Just look at what they did to 7.2. A very simplistic and stupid plugin. 6.1 was way better!

jQuery data rendering issue

I'm trying to render a menu containing check boxes something using JQuery according to a defined template in a div. I have a search box which will narrow down the menu.
There is something strange happening. When I have huge list of menu items (around 5000 items), it renders fine initially. Then if I type something and narrow down the result, it works fine. But when I press backspace and go back to the full list of items, the div gets displaced for a second and reappears in the correct position.
I have no clue of whats happening. Any pointers on where to look to debug will be helpful. Thanks!
Take a look at the Chrome Developer Tools. There's a ton of things in there you'll probably never use, but for this task I'd have a look at the elements tab and also the scripts tab to pause JavaScript events and inspect the DOM elements' styles.
This is a generic answer to a generic question though. If you're using Firefox, check out Firebug, but I prefer Chrome's tools and find them better integrated and user friendly, mostly from having used them a lot more.

Select doesn't work with flexslider in android (< 4.x)

I seem to face a problem with displaying and selecting the dropdown while using the flexslider in my mobile website.
Here, similar problem was listed. But the solution didn't work for me. I did use useCSS:false, somehow that didn't work for me too.
I use Android GingerBread.
I can submit buttons, enter text, use checkboxes but just not the dropdown. Any advice is welcome.
==Edited==
I found a somewhat similar reported issue here: https://github.com/woothemes/FlexSlider/issues/82
Even if it is a webkit related issue, can anyone suggest any solution for this?
Sometimes the dropdown from other slide is displayed, despite having backface-visibility:hidden.

Why does my custom drag and drop script fail?

I am currently trying to code my own JS drag and drop script (out of sheer curiosity and boredom, I know it would be much easier with a framework). My aim is a fully working Firefox3 version , IE can wait for now.
I just got stuck on a weird bug. When I drag the div for the first time, it works ok. When I drag it for the second time, it does not stick after releasing the button and I have to click once more to get it down. Third and consequent drags work flawlessly again (!?!).
Please see [the original page][1] (as I said, FireFox only for now) for an idea of what happens. The whole thing is done as a div with two events (onmousedown and onmouseup) using document.captureEvents(Event.MOUSEMOVE) for the intermediate movement. The script can be found [here][2] (disregard the bottom ajax part, it is prepared for some additional tricks and the bug stays if I take it out).
Please let me know if you have encountered something similar in the past or if you see a mistake somewhere. I know there may be better ways to go around the whole thing but I am specifically looking for a way to make my approach work.
EDIT: Chrome and Safari work.
EDIT: Taking the links offline, working on new version.
Well first up this works for me in FF3 if that's what you're asking.
This isn't going to be what you want to hear, but I strongly recommend you pick up a DnD method from mootools or jquery or similar. Just from an efficiency standpoint, DnD is a horrible thing to code up (done it a few times myself) and if you're not capable (no offence meant here) of resolving the numerous bugs that come up it's just going to be a huge drain of your time compared to just going with a robust mature implementation off the shelf. It is a hard thing to do.
If you do what to continue with your own code (as an exercise or out of pride - I can appreciate that :) ) this kind of problem is typically the result of either an event not being captured where you think it is because some other event got in the way first, a flag not being set where you think it is, or (or because of) an error which breaks out of your code at an unexpected point. Try and trace logically what's happening by logging out the event triggers.
If you could define how it wasn't working in more detail I might be able to trace it further (since I seemingly can't replicate), but I do suggest you explore the benefits of a solid library.

Categories

Resources