browser find highlighting is overwritten by TW #7

Closed
pmario opened this Issue Mar 7, 2012 · 21 comments

Projects

None yet

2 participants

@pmario
pmario commented Mar 7, 2012

If I do a built in "browser find" the browser highlights the match but after about 3 seconds TW seems to refresh the display. All highlighting is gone :(


I did see a very similar issue with the VideoTest tiddler. all 3 videos are flickering every 3 seconds. The Clock Tiddler seems to be activated every 3 seconds?

using latest stable FF ubuntu

@Jermolene
Owner

The ClockTiddler is indeed updated every three seconds. That causes content with a dependency on that tiddler to be refreshed, which includes content that is "dependentAll", and so gets refreshed whenever any tiddler changes (for example, the list macro works in this way).

In my tests, selected text is only disturbed if it happens to be in content that gets updated during the refresh cycle (eg within ClockTiddler itself). Can you confirm with which tiddlers you see the behaviour?

I do hope to get slightly more efficient and not updating content unless really necessary. As with classic TW, the list macro is apt to refresh unnecessarily.


It's bad if the VideoTests are flickering. Can you confirm that that happens even if VideoTests is the only tiddler listed in StoryTiddlers?

@pmario
pmario commented Mar 7, 2012

If VideoTests is the only tiddler in StoryTiddlers, there is no flickering.

@pmario
pmario commented Mar 7, 2012

It's the "Introduction: All Tiddlers list" that overwrites the browser find highlighting. The whole tiddler is updated.
But ClockTiddler is not open. It's just the list, that displays a link.

After a page reload, the ClockTiddler first is a missing link and after some time it turns into an interla link.

@Jermolene
Owner

OK, if I open TW5 and, before the ClockTiddler is created, select the text at the start of the "Introduction" tiddler that reads "functions as the build system for earlier versions", then the selection is maintained after the ClockTiddler is created and added to the title list. Do you see the same behaviour?

@pmario
pmario commented Mar 7, 2012

yes.

I did open firebug and it updates the <ul> that contains the list all macro. It seems only the ul is updated. The ClockTiddler is closed.

@Jermolene
Owner

Gosh, so the right DOM nodes are being selectively updated, but that is enough to cause the browser to lose a text selection elsewhere on the page? Can you try to duplicate the behaviour with another browser?

@pmario
pmario commented Mar 7, 2012

Hmm, It seems, I can't reproduce the exact same behaviour. Now it only clears the list. May be I did a typo in the search box, so the browser disabled the highlighting, because of the typo :)

But the video tiddler flickering is still a problem.

@pmario
pmario commented Mar 7, 2012

I did a test with chromium ubuntu - same behaviour. I did select a big portion of the screen. Only the list is redrawn. (chrome & FF )

@pmario
pmario commented Mar 7, 2012

OK, best test ever :)

<ctrl> <a> select all, exactly shows whats updated. (FF)


Select all with chromium behaves totally different, .... Mouse select is different too

@pmario
pmario commented Mar 7, 2012

should I create a video?

@Jermolene
Owner

OK, that makes sense. If I do a select all in Firefox I also see the selection being removed from the ClockTiddler in the list.

So, I think I conclude that (a) TW5 is correctly selectively updating the correct bits of the DOM and (b) Firefox is buggy in the way it deals with DOM mutations within text selections.

The flickering of the video I can't reproduce, though, annoyingly.

Doing a video would be terrific if you were able to, I don't know if the flickering would show up well, but it's maybe worth a try?

@pmario
pmario commented Mar 8, 2012

I did use your latest code: see: http://youtu.be/s8yyRO_otds

The VideoTest flickering in my video is very close, to what I see in the browser.

@Jermolene
Owner

Hi Mario

That's great, very helpful, thanks for all your trouble.

On OS X I'm seeing the same behaviour in Chrome as you are. I get similar behaviour in the OS X version of Firefox, except that I don't get the video flickering that you're seeing.

So, (1) I need to minimise the impact of the problem of the selection being affected by the selective DOM updating and (2) there's some kind of bug in Firefox on Ubuntu that is being tickled by the ClockTiddler updates.

What version of Firefox are you using?

@pmario
pmario commented Mar 8, 2012

FF 10.0.2 stable ubuntu 11.10
I'll have a look at win7 too. There are several more browsers safari, opera, ie9, ff, chrome. But don't know a good screen capture sw there.

@pmario
pmario commented Mar 8, 2012

Some Win7 test:

  • FF10.0.2 win7 shows absolutely the same behaviour. Video + selection + mouse selection
  • Safari 5.1.2 shows the exact same behaviour as chrome (video) including the zooming problem with the left sidebar.
  • ie9.0.8112.16421 (64 bit) shows the same behaviour with mouse selcetion as chrome. It doesn't show the first video link at all. <ctrl><f> find shows the same behaviour as FF(ubuntu).
    • new: if some text is selected with ctrl-f and the content is scrolled with the mouse (scrolling up and down), ie displays the "list all" content, on the left side of the window. It is flickering. There seems to be something broken :( The flickering goes away, if I click inside the window content. So the main window gets the focus back. <ctrl><f> input box loses the focus.
    • FF(win7) doesn't show this behaviour.
  • chrome 19.0.1061.1 (dev-m) shows the exact same behaviour as the linux version. no video flickering.
    • the left sidebar is shown if mouse is near the left window area. If mouse moves to the right, the text is zoomed. It looks a bit broken. (can be seen on the video)
  • Opera 11.61 shows the same behaviour as chrome (video)
    • there is no video flickering
    • there is no problem with the left sidebar
    • mouse select the list from top/down clears the list selection
    • mouse select the list from bottom/up expands the selection (like the video)
      • new: the selection can't be removed anymore. browser reload F5 needed.
  • chromium 6.0.4x shows the exact same behaviour as chrome
@Jermolene
Owner

Hi Mario

One source of confusion is that some of what you're seeing is the half-finished chooser panel. It slides in from the left when you mouseover the narrow lefthand grey column. It is intended to be a touch & mouse way of rapidly riffling through tiddlers to locate what you're looking for. It doesn't work properly yet, but it should be clear when you see it: it's a <UL> list of tiddler titles that are not currently rendered as links.

So, if we remove that issue from the equation, what are we left with? Perhaps I'm missing something but I don't see anything unexpected going on with your Chrome video. It seems to actually be doing quite a good job of minimising the damage to the text selection by DOM mutations.

One other minor point is that the first video is evidently encoded in a way that IE and Firefox can't pay.

@pmario
pmario commented Mar 9, 2012

I see 2 problems with the selection issue:

  • If I mark some text including a TW rendered list, to copy/paste it into an other editor, I can't do this. Either the selection goes away, or the selection expands. I use "select - copy paste" and "browser search" very often. So both functions are essential for me.
  • It is not the video encoding. FF just plays fine, if I start the first video from the vimeo.com site.

  • Have a look at my video at position 0:48, when the mouse goes from the left side FF to right side Chrome. The mouse hovers the gray area, which opens the sidebar. If the mouse moves to the right, the text is zoomed until the mouse leaves the browser. This seems to be a webkit issue, since Safari (win) has the same problem, than Chrome (unix)
  • http://www.youtube.com/watch?feature=player_detailpage&v=s8yyRO_otds#t=46s
@Jermolene
Owner

With respect to problem 1, do you get the same behaviour in ordinary TiddlyWiki? I'm thinking that we would, if we duplicated the behaviour of updating the ClockTiddler in the same way. Anyhow, I do think that that part of the problem can be mitigated by introducing more selective logic to prevent the lists being redrawn unnecessarily.

With respect to the first video not playing in Firefox, I suspect it doesn't work for me because I don't have Flash installed.


The behaviour you comment on at 0:48 is precisely what I was referring to as the half-finished navigation chooser. It's supposed to zoom out.

@pmario
pmario commented Mar 9, 2012

The behaviour you comment on at 0:48 is precisely what I was referring to as the half-finished navigation chooser. It's supposed to zoom out.

OK.

@pmario
pmario commented Jun 11, 2012

The latest (2012.06.11) TW5 seems to work now.
I think you can close this issue.

@Jermolene
Owner

Aha, that's good news, thanks.

@Jermolene Jermolene closed this Jun 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment