Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#14668 closed defect (invalid)

dojox.layout.ContentPane adjustPath doesn't work in IE

Reported by: Thomas Rueger Owned by: Thomas Rueger
Priority: undecided Milestone: tbd
Component: DojoX Layout Version: 1.7.0
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Hello, i got a Content Pane with:

<div id="tab_normen" dojoType="dojox.layout.ContentPane" adjustPaths="true" 
title="Normen" data-dojo-props="adjustPaths:true">

I fill this contentPane with the following click:

dojo.connect(dijit.byId("tab_normen"), "onClick", function(evt){
 	dojo.stopEvent(evt);
	dijit.byId("tab_normen").set("href",evt.target.href); 
}); <!-- connect tab_normen -->

Problem:

I have html links inside the html to be shown like:

<a href="1_1.html#1.1.1">1.1.1</a>

If i open now the app in chrome or safari everything oK. If i use IE 9 i get an error.

You can check via:

http://www.adrimdg.de/NeuIntranet/index6.html (Left Side click Normen, then ADN and then direct on 2010. In the right Side click on the 3th or 4th Link, named: 'Teil 1 Allgemeine Vorschriften' After this, on the right Side are the links: 1.1.1 and so on.

It seems that IE 9 could not follow this kind of links, but safari and chrome everything ok.

Greeting Thomas

Change History (6)

comment:1 Changed 8 years ago by bill

Component: GeneralDojoX Layout
Description: modified (diff)
Summary: Content Pane adjustPath doesn't work in IEdojox.layout.ContentPane adjustPath doesn't work in IE

comment:2 Changed 8 years ago by bill

You mean that the problem is because of the #1.1.1? ContentPane.set("href", "url") is supported by ContentPane.set("href", "url#anchor") is not supposed to work. Probably you should just trim the #anchor from the string that you pass to set().

comment:3 Changed 8 years ago by bill

Owner: set to Thomas Rueger
Status: newpending

comment:4 Changed 8 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

comment:5 Changed 8 years ago by Thomas Rueger

Hello, sorry for late answer, but with href and Dojo i have a lot of work :-(

Meanwhile i got this:

dojo.connect(dijit.byId("tab_normen"), "onClick", function(evt){

dojo.stopEvent(evt);

<!-- Workaround für Href mit # --> var temp = " "; temp = evt.target.href; if (temp.indexOf('#') != -1)

{

temp = temp.substring(0,temp.indexOf('#'));

}

dijit.byId("tab_normen").set("href",temp);

But that could no solution. W3C allows href like:

< a href="blablabla.html#Target>TextToShow?</a>

I got a lot of overview pages with links into the same Page, an i just can show the page and not the anchor :-(

But i discovered a really strange behaviour of dojo:

Take a href like:

<a href="blabla.html"><span class="Text">Text</span></a>

With the code above i get

temp = evt.target.href;

evt.target.href shows: <span> and not the underling blabla.html

Cu thomas

comment:6 in reply to:  5 Changed 8 years ago by bill

Replying to ruegerth:

Hello, sorry for late answer, but with href and Dojo i have a lot of work :-(

Meanwhile i got this:

dojo.connect(dijit.byId("tab_normen"), "onClick", function(evt){

dojo.stopEvent(evt);

<!-- Workaround für Href mit # --> var temp = " "; temp = evt.target.href; if (temp.indexOf('#') != -1)

{

temp = temp.substring(0,temp.indexOf('#'));

}

dijit.byId("tab_normen").set("href",temp);

But that could no solution. W3C allows href like:

< a href="blablabla.html#Target>TextToShow</a>

OK, sounds like you are asking for an enhancement that dojox.layout.ContentPane or dijit.layout.ContentPane be able to handle URL's with hashes. If so you could open a ticket to that effect, but not sure if we are interested in implementing that or not.

However you could do it yourself, something like this, although I haven't tested it:

dijit.byId("tab_normen").set("href", href.replace(/#.*/, "")).then(function(){
   if(href.test(/#/)){
       var hash = href.replace(/.*#/);
       dojo.scrollIntoView(dojo.query("a[name="+hash+"]", 
             dijit.byId("tab_normen").containerNode)[0]);
   }
});
Last edited 8 years ago by bill (previous) (diff)
Note: See TracTickets for help on using tickets.