April 7, 2007

Update on Google Notebook's Infamous Delete Problem !

Surprisingly Google rectified one of the problems i mentioned in my earlier post in just 2 days. The layout looks good in Firefox under Linux. The other problem, deleting the text when we past text from the Kate editor still remains. Here the problem is not with the Google notebook, in fact the problem is with Kate editor only. What happens when we copy some of the text from the Kate is, it adds meta tag before the text as show below. (Please note here that, although we copy text only, Kate tries to preserve the formatting by putting the text within pre tag. Although it is a text, it is not actually plain text, its html code. This is the way formatting will be preserved across applications when copy paste it)

( I generated the above html code by copy pasting some text from Kate to Thunderbird compose window and i saved it as html)

After observing the above, i viewed the source code using the Firebug after pasting some text from Kate editor. (We have to see the source code before clicking on any other note. If we click on other note the copied text will get deleted) The source code looks as shown below.


Now i got little bit idea about what might happening inside. When we create a new note in Notebook, it creates an iframe and puts whatever text we put in body of the document. When we copy some text from the Kate, as i said earlier, it is putting some meta tag before the text. Because meta can't come under body, the newly added html piece of code is wrong. After pasting the code, Google Notebook validating the copied text and deleting it as it is not valid html. That's why, after pasting the text from Kate, the box becomes empty and Google Notebook always deletes the empty notes when we click on the other note. So it ultimately getting deleting. To cross check it, i deleted the meta notes from Firebug and it works beautifully after that. Because of the same reason, i guess, i can't able to paste the copied text from Kate to Microsoft's Wordpad editor (The default editor that comes with Windows !) . But i can copy it to Notepad, because it ignores the html tags. So Google Notebook have to remove the unnecessary meta information. Anyway copying meta information makes no sense. Thanks to Firebug for helping in figuring out this problem !

2 comments:

  1. As we often to say to each other when we fix things in Notebook, awesome detective work! Need a job? ;-)

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete