Adding document links has errors during page load #153

Closed
pingfr opened this Issue Nov 17, 2011 · 8 comments

Comments

Projects
None yet
2 participants
@pingfr

pingfr commented Nov 17, 2011

We are seeing some odd behavior when adding document links to a page in Refinery. One of our customers noticed it first and I have been able to recrate it. When trying to add a document link to a page, we get the bowser's document download dialog rather than the expected document selection. After doing some testing, I suspect that the problem is during the page load. When the page is loading the documents to display, not all the Javascript support is in place until the load is complete. This causes the browser to get and process the click before the Javascript can intercept it.

There also seem to be side affects to this problem. After the download dialog is displayed and I click on the cancel button on the add link page, it redirects back to a view of the page I am adding the link to. I would expect it to close and return to the page editor in the browser window that it opened from. In some caes this even causes the page editor to freeze. I have to leave the page (save or cancel) and then come back to continue editing.

The client that we have has a bunch of documents. Four or five pages worth. It is easier for me to recreate this in that situation, but have done it with fewer. We are both using Internet Explorer. I am IE8. I think they are IE6. I haven't tested this yet in any other mozilla browsers. Unfortunately our customer is tied to IE.

Here are the steps to recreate it:

  1. Go to the pages tab in the Refinery Editor
  2. Select a page to edit
  3. Enter some text, highlight, and choose the "Add Link" button.
  4. Select to add a file link. As quickly as possible try to select a link on the page. If you catch a link early enough, you will get the browser document download dialog. This could be difficult to recreate because it depends on the speed the page loads the document list.

I don't know what can be done here. Anything that would either stop default browser processing as the page loads or speeds up the page load for documents would probably help. I suspect this is a probelm tied to the Add Link page, so may be an issue on icons or other link types as well. This mostly causes confusion on the customer part. It also slows down the process of adding links to a site. Neither of these is a fatal issue. Just very annoying.

@parndt

This comment has been minimized.

Show comment Hide comment
@parndt

parndt Nov 17, 2011

Owner

Hi,

Unfortunately Refinery does not support IE6.. it is seriously buggy.
Can your customer upgrade? Can they use Google's Chrome Frame? http://www.google.com/chromeframe?prefersystemlevel=true

Phil

Owner

parndt commented Nov 17, 2011

Hi,

Unfortunately Refinery does not support IE6.. it is seriously buggy.
Can your customer upgrade? Can they use Google's Chrome Frame? http://www.google.com/chromeframe?prefersystemlevel=true

Phil

@parndt

This comment has been minimized.

Show comment Hide comment
@parndt

parndt Nov 17, 2011

Owner

Which is not to say that this is not a problem!

Can you reproduce this in Firefox, Opera or Chrome?

Thanks,
Phil

Owner

parndt commented Nov 17, 2011

Which is not to say that this is not a problem!

Can you reproduce this in Firefox, Opera or Chrome?

Thanks,
Phil

@pingfr

This comment has been minimized.

Show comment Hide comment
@pingfr

pingfr Nov 17, 2011

Phil,

Thanks for looking into this. I am with you on IE 6. My customer is a bank who for some reason still installs it on all their machines. I have been suggesting that they upgrade and the people that are using Refinery are supposed to be going to IE8 or IE9. I would completely understand if you don't even look at it in IE 6.

I have not had a chance to test other browsers at this point. I have some other unrelated issues that I have to deal with first and heading off for vacation. I will try and do some testing when I get a chance. I will post my results.



FRANK PING
509-924-1814

-----Original Message-----
From: Philip Arndt [mailto:reply@reply.github.com]
Sent: Thursday, November 17, 2011 12:30 PM
To: Frank Ping
Subject: Re: [refinerycms-blog] Adding document links has errors during page load (#153)

Hi,

Unfortunately Refinery does not support IE6.. it is seriously buggy.
Can your customer upgrade? Can they use Google's Chrome Frame? http://www.google.com/chromeframe?prefersystemlevel=true

Phil


Reply to this email directly or view it on GitHub:
https://github.com/resolve/refinerycms-blog/issues/153#issuecomment-2781503
This email may contain confidential or protected material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.

pingfr commented Nov 17, 2011

Phil,

Thanks for looking into this. I am with you on IE 6. My customer is a bank who for some reason still installs it on all their machines. I have been suggesting that they upgrade and the people that are using Refinery are supposed to be going to IE8 or IE9. I would completely understand if you don't even look at it in IE 6.

I have not had a chance to test other browsers at this point. I have some other unrelated issues that I have to deal with first and heading off for vacation. I will try and do some testing when I get a chance. I will post my results.



FRANK PING
509-924-1814

-----Original Message-----
From: Philip Arndt [mailto:reply@reply.github.com]
Sent: Thursday, November 17, 2011 12:30 PM
To: Frank Ping
Subject: Re: [refinerycms-blog] Adding document links has errors during page load (#153)

Hi,

Unfortunately Refinery does not support IE6.. it is seriously buggy.
Can your customer upgrade? Can they use Google's Chrome Frame? http://www.google.com/chromeframe?prefersystemlevel=true

Phil


Reply to this email directly or view it on GitHub:
https://github.com/resolve/refinerycms-blog/issues/153#issuecomment-2781503
This email may contain confidential or protected material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.

@pingfr

This comment has been minimized.

Show comment Hide comment
@pingfr

pingfr Dec 5, 2011

Sorry for the delay in testing with a Mozilla browser. I finally got a chance to test in Firefox. I am able to recreate the same issue in Firefox that I was seeing in the IE browser. I think IE may take slightly longer to load the page, so it is a little easier to recreate there. If I have a long list of files, change to a different page using the page number navigation, and quickly select a file in the list; I will get the file download dialog. So this is not an IE specific problem. Firefox also has the issue.

This customer will be using some version of IE. It is clear to me they have no interest or desire to go to a different browser. This feature is not open to the public, so I know that everyone accessing it will be using IE.

Let me know if there is anything further that I can do to assist you with this.

pingfr commented Dec 5, 2011

Sorry for the delay in testing with a Mozilla browser. I finally got a chance to test in Firefox. I am able to recreate the same issue in Firefox that I was seeing in the IE browser. I think IE may take slightly longer to load the page, so it is a little easier to recreate there. If I have a long list of files, change to a different page using the page number navigation, and quickly select a file in the list; I will get the file download dialog. So this is not an IE specific problem. Firefox also has the issue.

This customer will be using some version of IE. It is clear to me they have no interest or desire to go to a different browser. This feature is not open to the public, so I know that everyone accessing it will be using IE.

Let me know if there is anything further that I can do to assist you with this.

@pingfr pingfr closed this Dec 5, 2011

@pingfr pingfr reopened this Dec 5, 2011

@pingfr

This comment has been minimized.

Show comment Hide comment
@pingfr

pingfr Dec 5, 2011

Sorry, accidentally hit the wrong button, This is still an open issue.

pingfr commented Dec 5, 2011

Sorry, accidentally hit the wrong button, This is still an open issue.

@parndt

This comment has been minimized.

Show comment Hide comment
@parndt

parndt Dec 5, 2011

Owner

So a patch would need to disable the link's clickability quicker?

Owner

parndt commented Dec 5, 2011

So a patch would need to disable the link's clickability quicker?

@pingfr

This comment has been minimized.

Show comment Hide comment
@pingfr

pingfr Dec 5, 2011

The root problem is that the default action for file download is available for a brief period of time before the page's JavaScript takes over. One way to tackle it is to be able to take control of what happens on the page faster. This could be a challenge, depending on exactly what you do now.

I did take a quick peek at the source of this page. I noticed a couple things. The JavaScript is loaded at the end of the page after everything else is done. Not sure if this was by design or if it just ended up that way. Moving that to the top may help, if that is possible. Also the links are standard anchor tags. You may experiment with overriding the onclick with a JavaScript call makes a selection rather than attempting to follow the link. This is just a suggestion. I haven't had the time to trace through everything and see how this all works.



FRANK PING
509-924-1814

-----Original Message-----
From: Philip Arndt [mailto:reply@reply.github.com]
Sent: Monday, December 05, 2011 11:55 AM
To: Frank Ping
Subject: Re: [refinerycms-blog] Adding document links has errors during page load (#153)

So a patch would need to disable the link's clickability quicker?


Reply to this email directly or view it on GitHub:
https://github.com/resolve/refinerycms-blog/issues/153#issuecomment-3022233
This email may contain confidential or protected material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.

pingfr commented Dec 5, 2011

The root problem is that the default action for file download is available for a brief period of time before the page's JavaScript takes over. One way to tackle it is to be able to take control of what happens on the page faster. This could be a challenge, depending on exactly what you do now.

I did take a quick peek at the source of this page. I noticed a couple things. The JavaScript is loaded at the end of the page after everything else is done. Not sure if this was by design or if it just ended up that way. Moving that to the top may help, if that is possible. Also the links are standard anchor tags. You may experiment with overriding the onclick with a JavaScript call makes a selection rather than attempting to follow the link. This is just a suggestion. I haven't had the time to trace through everything and see how this all works.



FRANK PING
509-924-1814

-----Original Message-----
From: Philip Arndt [mailto:reply@reply.github.com]
Sent: Monday, December 05, 2011 11:55 AM
To: Frank Ping
Subject: Re: [refinerycms-blog] Adding document links has errors during page load (#153)

So a patch would need to disable the link's clickability quicker?


Reply to this email directly or view it on GitHub:
https://github.com/resolve/refinerycms-blog/issues/153#issuecomment-3022233
This email may contain confidential or protected material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.

@parndt

This comment has been minimized.

Show comment Hide comment
@parndt

parndt Dec 5, 2011

Owner

It's by design that the javascript is at the bottom so that the page is more responsive for the user.
I'm pretty sure we already disable all the anchor onclick actions so it's possible that in your case it's just not being applied quick enough.

Owner

parndt commented Dec 5, 2011

It's by design that the javascript is at the bottom so that the page is more responsive for the user.
I'm pretty sure we already disable all the anchor onclick actions so it's possible that in your case it's just not being applied quick enough.

@parndt parndt closed this Aug 24, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment