Item14349: EditRowPlugin Edit Table button not functional on IE 11.

pencil
Priority: Urgent
Current State: Confirmed
Released In: 2.1.4
Target Release: patch
Applies To: Extension
Component: EditRowPlugin
Branches:
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
See Support.Question1863

It appears that HTML 5 has a documented restriction that the <a> tag cannot contain nested elements such as the button tag.

See http://stackoverflow.com/questions/802839/button-inside-of-anchor-link-works-in-firefox-but-not-in-internet-explorer Also, http://w3c.github.io/html/textlevel-semantics.html#the-a-element which states:
Content model: Transparent, but there must be no interactive content or a element descendants.
which includes the button.

-- GeorgeClark - 23 Mar 2017

This patch removes the a tag and puts the url into an onClick, but it doesn't work. The URL looks right in the generated html, but it must be missing a class or something, as the javascript changes the topic name to "unknown".

diff --git a/EditRowPlugin/lib/Foswiki/Plugins/EditRowPlugin/Table.pm b/EditRowPlugin/lib/Foswiki/Plugins/EditRowPlugin/Table.pm
index 54f6645..e27583b 100644
--- a/EditRowPlugin/lib/Foswiki/Plugins/EditRowPlugin/Table.pm
+++ b/EditRowPlugin/lib/Foswiki/Plugins/EditRowPlugin/Table.pm
@@ -341,29 +341,26 @@ sub render {
 
             # Full table editing is not disabled
             my $title  = "Edit full table";
+            my $url = Foswiki::Func::getScriptUrl(
+                $this->getWeb(), $this->getTopic(), 'view',
+                erp_topic => $active_topic,
+                erp_table => $id,
+                erp_row   => -1,
+                '#'       => 'erp_' . $id
+            );
             my $button = Foswiki::Render::html(
                 'button',
                 {
                     type  => 'button',
                     name  => "erp_edit_${id}",
                     class => 'erp-edittable',
+                    onClick => "location.href = '$url'",
                     title => $title
                 }
             );
-            my $url = Foswiki::Func::getScriptUrl(
-                $this->getWeb(), $this->getTopic(), 'view',
-                erp_topic => $active_topic,
-                erp_table => $id,
-                erp_row   => -1,
-                '#'       => 'erp_' . $id
-            );
             push(
-                @out,
-                Foswiki::Render::html( 'a', { name => "erp_${id}" } )
-                  . Foswiki::Render::html( 'a',
-                    { href => $url, title => $title }, $button )
-                  . '<br />'
-            );
+                @out,  Foswiki::Render::html( 'a', { name => "erp_${id}" } )
+                . $button . '<br />');
         }
         elsif ( Foswiki::Func::isTrue( $this->{attrs}->{changerows} )
             && $this->{attrs}->{disable} !~ /row/ )

-- GeorgeClark - 23 Mar 2017
 

ItemTemplate edit

Summary EditRowPlugin Edit Table button not functional on IE 11.
ReportedBy GeorgeClark
Codebase 2.1.3, 2.1.3 beta2, 2.1.3 beta1, 2.1.2, 2.1.1, 2.1.0, 2.1.0 beta1, 2.0.3, 2.0.2, 2.0.1, 2.0.0
SVN Range
AppliesTo Extension
Component EditRowPlugin
Priority Urgent
CurrentState Confirmed
WaitingFor
Checkins
TargetRelease patch
ReleasedIn 2.1.4
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
Topic revision: r1 - 23 Mar 2017, GeorgeClark - This page was cached on 08 Apr 2017 - 15:15.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License