Last modified: 2014-03-19 20:21:44 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 T49235, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47235 - CodeEditor and the experimental "live preview" preference are not compatible.
CodeEditor and the experimental "live preview" preference are not compatible.
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
CodeEditor (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Brad Jorsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-15 05:15 UTC by Liangent
Modified: 2014-03-19 20:21 UTC (History)
5 users (show)

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


Attachments

Description Liangent 2013-04-15 05:15:23 UTC
I have live (ajax) preview enabled.
Comment 1 Andre Klapper 2013-04-15 10:07:36 UTC
Could you elaborate on the bug summary and on which wiki to reproduce? TIA.
Comment 2 Liangent 2013-04-15 10:51:45 UTC
In Firebug, I see the original code submitted as wpTextbox1.
Comment 3 Brad Jorsch 2013-04-15 14:33:36 UTC
(In reply to comment #0)
> I have live (ajax) preview enabled.

This is the key. It refers to the "Use live preview (requires JavaScript) (experimental)" preference in the Editing tab.

It appears that this has nothing to do with Scribunto. The problem is that CodeEditor and the "Use live preview" preference are not compatible: "live preview" reads out the content of the text box to find the text to diff, but CodeEditor does not update the (hidden) text box until the form is submitted. If the toggle button in CodeEditor's UI is used to display the text box, live preview's diff button works fine.

I imagine that CodeEditor's javascript would need to listen for the "LivePreviewPrepare" event sent by the live preview javascript (see resources/mediawiki.action/mediawiki.action.edit.preview.js line 15) and update the hidden text box so live preview is able to find the updated text.
Comment 4 Bartosz Dziewoński 2013-04-15 14:35:25 UTC
(In reply to comment #3)
> I imagine that CodeEditor's javascript would need to listen for the
> "LivePreviewPrepare" event sent by the live preview javascript (see
> resources/mediawiki.action/mediawiki.action.edit.preview.js line 15) and
> update
> the hidden text box so live preview is able to find the updated text.

That event might be killed after the fix for bug 23580 is merged.
Comment 5 Gerrit Notification Bot 2013-05-07 15:09:02 UTC
Related URL: https://gerrit.wikimedia.org/r/62612 (Gerrit Change Iba1b727c55aabcd31afc06cec99618fcdce207d8)
Comment 6 Gerrit Notification Bot 2013-05-08 14:21:43 UTC
Related URL: https://gerrit.wikimedia.org/r/62814 (Gerrit Change I39c626d066797d887769c3715df88838e709d527)
Comment 7 Brad Jorsch 2013-05-20 16:49:22 UTC
Merged.
Comment 8 Gerrit Notification Bot 2014-01-30 11:52:53 UTC
Change 110347 had a related patch set uploaded by Helder.wiki:
Fire hook "LivePreviewPrepare"

https://gerrit.wikimedia.org/r/110347
Comment 9 Gerrit Notification Bot 2014-03-19 06:21:08 UTC
Change 110347 abandoned by Krinkle:
Fire hook "LivePreviewPrepare"

Reason:
Closing. A 'before' fire is not compatible with how mw.hook works (asynchronous).

https://gerrit.wikimedia.org/r/110347
Comment 10 Gerrit Notification Bot 2014-03-19 18:34:25 UTC
Change 119527 had a related patch set uploaded by Helder.wiki:
Remove inexistent hook "LivePreviewPrepare"

https://gerrit.wikimedia.org/r/119527
Comment 11 Gerrit Notification Bot 2014-03-19 20:21:44 UTC
Change 119527 merged by jenkins-bot:
Remove inexistent hook "LivePreviewPrepare"

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

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


Navigation
Links