Last modified: 2014-05-09 10:53:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T31440, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29440 - $().wikiEditor('removeFromToolbar') can only find <span> buttons, not <img> buttons
$().wikiEditor('removeFromToolbar') can only find <span> buttons, not <img> b...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikiEditor (Other open bugs)
unspecified
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Trevor Parscal
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-16 20:44 UTC by Brion Vibber
Modified: 2014-05-09 10:53 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Brion Vibber 2011-06-16 20:44:21 UTC
Buttons added with addToToolbar seem to create <img>s rather than <span>s, but the removeFromToolbar function will only remove tools that are <span>s:

    target += ' span[rel=' + data.character + ']';

An img button:

    <img width="22" height="22" src="/trunk/extensions/CodeEditor/images/code-selected.png?20110616T191440Z" alt="&lt;codeeditor-toolbar-toggle&gt;" title="&lt;codeeditor-toolbar-toggle&gt;" rel="codeEditor" class="tool tool-button">

A span button:

    <span alt="Bold" title="Bold" rel="bold" class="tool tool-button wikiEditor-toolbar-spritedButton" style="background-position: 2px -142px;">Bold</span>

Thus this doesn't work as expected:

		$('#wpTextbox1').wikiEditor('removeFromToolbar', {
			'section': 'main',
			'group': 'format',
			'tool': 'codeEditor'
		});
Comment 1 Jerome Poulin 2012-09-12 21:54:10 UTC
This bug is still present in 1.19.2 final, it seems this commit:
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/WikiEditor.git;a=commit;f=modules/jquery.wikiEditor.toolbar.js;h=e63ef419f074a01871a3c23f61f61ee84eb7ae3e
has been forgotten.
It uses <a> instead of <span>.
Comment 2 Jerome Poulin 2012-09-12 21:56:45 UTC
Commit# is e63ef419f074a01871a3c23f61f61ee84eb7ae3e
Comment 3 Derk-Jan Hartman 2014-04-08 00:00:40 UTC

*** This bug has been marked as a duplicate of bug 37484 ***
Comment 4 Derk-Jan Hartman 2014-04-08 00:07:20 UTC
Eh, wait, this still exists.. zomg
Comment 5 Gerrit Notification Bot 2014-04-08 00:16:07 UTC
Change 124503 had a related patch set uploaded by TheDJ:
Repair removeFromToolbar() to handle image buttons

https://gerrit.wikimedia.org/r/124503
Comment 6 Gerrit Notification Bot 2014-05-09 10:23:06 UTC
Change 124503 merged by jenkins-bot:
Repair removeFromToolbar() to handle image buttons

https://gerrit.wikimedia.org/r/124503

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links