Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2015-11-01 03:48:06

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,079
Website

[admin layout] conflicting ID’s on Write panel with rah_textile_bar

Or fun days in debugging land…

STR: On a 4.6 Admin-layout branch install:

  1. go to the Write panel, verify that the “Article Image” twisty pane toggles correctly
  2. install and activate the rah_textile_bar extension
  3. return to the Write panel, try to toggle the visibility of the “Article Image” twisty pane.

Actual result: nothing happens, if that pane was open (visible), it stays open, else it remains invisible. Looking at the interaction through the browser developer tools (Safari, Firefox), one can see that the style and aria-expanded attributes on the targeted div are not toggled (the relevant attributes on the h3 and a elements are toggled however).

The script looks for an element with id=image.

It took me a moment to figure it out… (hair pulling, head banging). The rah_textile_bar extension has a little button to insert an image which has an id=image.

Oddly enough, this works correctly on the 4.6 Master-branch and 4.5.7 release. There are no significant differences in markup, as far as I can tell (but I’m sure I’m missing something, somewhere…).

Hmm, hold on, I think I understand. On the 4.6 Master branch and 4.5.7 release, the affected twisty pane is located in the left-hand sidebar and comes in first in the DOM. On the 4.6 Admin-layout branch however, there is only one sidebar, that comes in after the main column in the DOM. Thus, with the 4.6 Master branch, the script finds the first occurrence of the targeted id which is the one we’re actually looking for. On the 4.6 Admin-layout branch, with the rah_textile_bar extension installed, the 1st occurrence of the targeted id is the one for the toolbar button above the main textarea.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#2 2015-11-01 10:47:12

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: [admin layout] conflicting ID’s on Write panel with rah_textile_bar

i should really change the id on this panel to something less generic. Can you open an issue at Textpattern repo to keep it on my radar?

Offline

#3 2015-11-01 13:59:05

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,079
Website

Re: [admin layout] conflicting ID’s on Write panel with rah_textile_bar

Done: Issue 578.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

Board footer

Powered by FluxBB