Last modified: 2014-11-20 13:32:50 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 T59713, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 57713 - Unable to "Edit pages on double click": Uncaught TypeError: Cannot call method 'click' of undefined
Unable to "Edit pages on double click": Uncaught TypeError: Cannot call metho...
Status: PATCH_TO_REVIEW
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Wikidata bugs
: javascript
Depends on:
Blocks: 73649
  Show dependency treegraph
 
Reported: 2013-11-28 14:24 UTC by Helder
Modified: 2014-11-20 13:32 UTC (History)
5 users (show)

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


Attachments

Description Helder 2013-11-28 14:24:26 UTC
1) Enable "Edit pages on double click" at
https://www.wikidata.org/wiki/Special:Preferences?uselang=en#mw-prefsection-editing
2) Go to https://www.wikidata.org/wiki/Q5299984?debug=1
3) Double click

The line
$( '#ca-edit a' ).get( 0 ).click();
from
https://bits.wikimedia.org/static-1.23wmf4/resources/mediawiki.action/mediawiki.action.view.dblClickEdit.js
will cause
Uncaught TypeError: Cannot call method 'click' of undefined
Comment 1 Helder 2014-11-19 10:55:34 UTC
This is still reproducible (tested with Firefox 33). The code is now at
https://bits.wikimedia.org/static-1.25wmf8/resources/src/mediawiki.action/mediawiki.action.view.dblClickEdit.js
Comment 2 Thiemo Mättig 2014-11-19 16:09:06 UTC
Isn't this a core error then? Can you please move it?
Comment 3 Helder 2014-11-19 20:58:10 UTC
Maybe. But all non-Wikidata pages have a "ca-edit" link, so the code works fine.
Comment 4 Gerrit Notification Bot 2014-11-20 13:00:32 UTC
Change 174679 had a related patch set uploaded by Thiemo Mättig (WMDE):
Do not call click on undefined

https://gerrit.wikimedia.org/r/174679
Comment 5 Thiemo Mättig 2014-11-20 13:01:55 UTC
(In reply to Helder from comment #3)
> all non-Wikidata pages have a "ca-edit" link

The code is in core. Core shouldn't make such assumptions, especially since ContentHandlers are supported. However, creating a fix is dead simple. Merging not so much. Let's see what happens.
Comment 6 Helder 2014-11-20 13:06:23 UTC
Just to clarify: the feature should work (not just not trow an error). When the user double click in a field, it should enter in edit mode.
Comment 7 Thiemo Mättig 2014-11-20 13:26:32 UTC
(In reply to Helder from comment #6)
> When
> the user double click in a field, it should enter in edit mode.

That's unrelated to this report. Please open a separate one for this feature request.

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


Navigation
Links