the BigBug is fixed (hopefully)

sometimes you highlight text in different parts of the same paragraph, you come back later and you find only half of your marks. this is the BigBug.

After weeks of investigations, of trying different strategies, of reading specs and of testing… fixing the bug was a matter of ordering the marks. It took me 5min this morning. But why did it take so long. It has to do with the fact that the BigBug is a symptom of a BiggerBug, otherwise called “conceptual gotcha” : the DOM is dynamic. it can change at any time without notice and markkit will have to cope with this. Web pages are full of Javascript that CRUDs Nodes in the DOM. Ads are the most common example. What would markkit do if some javascript displaced the paragraph where you highlighted text before your marks were loaded? I don’t know (actually, i know, but i wont tell you).

What i did is just a bugfix. It was possible because the BigBug is a specific case related to the fact that markkit itself changes the DOM under his own feet (!). Someday i will have to implement a more general solution to the problem.

other improvements i also did this morning :

  • fragment identifiers : when you click the bookmarklet, markkit used to remove the fragment identifier. now it leaves it.
  • you own your session : if you click the markkit bookmarklet you create a new session. you highlight text, then you send the URL to your friend. he can see your marks of course. but he was also able to use your session to highlight text. which is annoying, since he’s not always aware that he is in the middle of a markkit session. From now on, he wont be able to highlight text in your session, he will have to start his own session using his own bookmarklet.
Advertisements

Post a Comment

Required fields are marked *
*
*

%d bloggers like this: