Ticket #1410 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

Path Handler can result in selection of map

Reported by: bartvde Owned by:
Priority: minor Milestone: 2.6 Release
Component: general Version: 2.5
Keywords: Cc:
State: Complete

Description

Right now when using the Path handler, the map can get selected (and turns blue as a result). IMHO this is unwanted behaviour. The Drag Handler has code to solve this, but maybe this should be moved into Handler.js? Otherwise we keep on repeating the same blocks of code?

Attachments

ticket1410.patch Download (2.4 KB) - added by bartvde 5 years ago.
ticket1410.2.patch Download (1.4 KB) - added by bartvde 5 years ago.
ticket1410.3.patch Download (1.8 KB) - added by elemoine 5 years ago.
ticket1410.4.patch Download (499 bytes) - added by bjorn 5 years ago.

Change History

Changed 5 years ago by bartvde

  Changed 5 years ago by bartvde

Sorry this patch has some other changes in there. I'll clean it up as soon as there is consensus on how to approach this.

  Changed 5 years ago by crschmidt

Is this the same as #1368?

  Changed 5 years ago by bartvde

Hi Chris, could be (I am not 100% sure, I don't have any flicker, it just selects the map div), but if so then that bug should be for component Handler and not for the VML/Vector code.

follow-up: ↓ 8   Changed 5 years ago by crschmidt

Agreed: I believe the situation being described is just the selection. I'll close that as a duplicate. Text there is:

When editing features in IE the browser sometimes picks this up as element selection of the whole OL div (I think). This toggles back and forth causing the map to flicker with opague blue background. This happens most frequently when dragging lines or polygon vertices.

I have investigated the issue and found that the flickering is introduced in r5772. However I still think element selecion occurs in earlier revs, since there is noticable rendering speed hickups coinciding with the flickering in r5772 whereas in r5771 there is only the hickups.

I have only verfied this with IE7 at the moment, but think it affects IE6 too.

  Changed 5 years ago by bjorn

I reported 1368. I just tried the patch and can verify that the map selection problems are gone in IE7.

The "rendering speed hickups" are still there so I guess that issue is unrelated to the map selection problem.

Changed 5 years ago by bartvde

  Changed 5 years ago by crschmidt

  • state set to Review

Changed 5 years ago by elemoine

  Changed 5 years ago by elemoine

ticket1410.3.patch factorizes some code in private methods. What you think? (code is absolutely untested)

in reply to: ↑ 4   Changed 5 years ago by tschaub

Replying to crschmidt:

Agreed: I believe the situation being described is just the selection. I'll close that as a duplicate. Text there is: When editing features in IE the browser sometimes picks this up as element selection of the whole OL div (I think). This toggles back and forth causing the map to flicker with opague blue background. This happens most frequently when dragging lines or polygon vertices. I have investigated the issue and found that the flickering is introduced in r5772. However I still think element selecion occurs in earlier revs, since there is noticable rendering speed hickups coinciding with the flickering in r5772 whereas in r5771 there is only the hickups. I have only verfied this with IE7 at the moment, but think it affects IE6 too.

I think I read your comment correctly, but it is still not clear when this occurred, correct? I'm assuming it is a regression.

  Changed 5 years ago by crschmidt

I was just copy pasting here: I don't know anything about the issue. However, it is reported in #1368 that this was caused by r5772 -- before that, it didn't happen, after that, it did.

  Changed 5 years ago by bartvde

Hmm, I am still getting this problem even with the patch applied.

  Changed 5 years ago by bjorn

Only the first patch (ticket1410.patch) works, the rest doesn't seem to resolve the issue at all. But the first patch also seem to disable browser element selection permanently. This is tested in IE7 only.

  Changed 5 years ago by bjorn

Tested some more and can verify that the latest patch modified to not turn on selection gives same results as first patch.

Also, the problem affects other operations while there is VML graphics on the map. If one polygon is drawn then drag panning will cause element selection, if done by clicking and draggning above the polygon. So it appears that this problem will not go away by patching the path handler.

  Changed 5 years ago by euzuro

  • state changed from Review to Needs More Work

  Changed 5 years ago by bjorn

This behaviour, or at least very similar, can also be seen in Safari 3.1 so I guess that means that this is not a VML specific issue. I cannot get Firefox 2.x to show any sign of this behaviour though.

  Changed 5 years ago by crschmidt

Safari's VML support with selection and dragging has always been a bit weird, so it's not hugely surprising to me.

Does reverting the changes in r5772 fix the Safari issue?

  Changed 5 years ago by crschmidt

I've confirmed that Safari is *not* fixed by reverting r5772, which means that it is a different issue. It's also significantly less visible, so it's probably always been there, and the smaller market share means we just haven't gotten complaints. (It only selects while dragging: once you stop, it doesn't do it anymore.)

  Changed 5 years ago by crschmidt

Actually, just tested this in IE, and realized that Safari and IE behave somewhat similarly, so ignore the latter part of my comment above. However, this still doesn't mean that the same issue caused this behavior between the two.

I'm not really sure what to do about this. It seems to be a clear case where our behavior is simply exploiting a weakness in the rendering engine: perhaps stopping mousemove or similar would help us, but it would lose out in other ways that I'm not convinced are appropriate. (The MousePosition control, for example, would stop working.) Perhaps we need to do something different instead of r5772, at least in IE/VML...

Changed 5 years ago by bjorn

  Changed 5 years ago by bjorn

Investigated more.. and finally found a solution as described at:  http://adamplatti.net/blog/2007/04/05/the-easiest-way-to-make-html-text-unselectable/

At first it seemed to be sufficient to only apply to the root node, but didn't stop the issue from happening completely. It does seem to work though if added to all the nodes, which is what I do in ticket1410.4.patch

  Changed 5 years ago by crschmidt

  • state changed from Needs More Work to Review

I'm going to do a bit more playing round with this in IE asap, but I think this is looking like a decent solution.

  Changed 5 years ago by bartvde

The latest patch ticket1410.4.patch works fine for me.

  Changed 5 years ago by crschmidt

  • state changed from Review to Commit

After reviewing this reasonably thoroughly through manual testing, I am convinced that this is a valid fix to the problem it is solving.

  Changed 5 years ago by crschmidt

  • status changed from new to closed
  • state changed from Commit to Complete
  • resolution set to fixed

(In [6708]) Path Handler can result in selection of map in IE (Closes #1410), with patch + research from bjorn (hooray!)

Note: See TracTickets for help on using tickets.