Medium.js
Medium.js copied to clipboard
Cannot read property 'innerText' of undefined
medium.js:1725 Uncaught TypeError: Cannot read property 'innerText' of undefined
Heres my init:
var ed = $("#createBox");
new Medium({
element: ed[0],
modifier: 'auto',
placeholder: "What's happening?",
autofocus: true
)}
Can you throw this into jsfiddle.net? Also, what browser, and version of Medium.js are you using?
On Wed, Jan 14, 2015 at 9:01 PM, Simon [email protected] wrote:
medium.js:1725 Uncaught TypeError: Cannot read property 'innerText' of undefined
Heres my init:
var ed = $("#createBox"); new Medium({ element: ed[0], modifier: 'auto', placeholder: "What's happening?", autofocus: true
)}
— Reply to this email directly or view it on GitHub https://github.com/jakiestfu/Medium.js/issues/130.
Robert Plummer
Chrome, version in medium.js says: * Version: master
http://jsfiddle.net/a76kmk9x/
Interesting. I am unable to reproduce locally. Can you give me instructional step by step to reproduce?
On Wed, Jan 14, 2015 at 9:25 PM, Simon [email protected] wrote:
http://jsfiddle.net/a76kmk9x/
— Reply to this email directly or view it on GitHub https://github.com/jakiestfu/Medium.js/issues/130#issuecomment-70030542.
Robert Plummer
Yea the fiddle seems to work fine too :( Typical - I have put exactly what I have in my code, into fiddle.
I'm intrigued. Care for a remote session?
On Wed, Jan 14, 2015 at 9:35 PM, Simon [email protected] wrote:
Yea the fiddle seems to work fine too :( Typical - I have put exactly what I have in my code, into fiddle.
— Reply to this email directly or view it on GitHub https://github.com/jakiestfu/Medium.js/issues/130#issuecomment-70031256.
Robert Plummer
Sure how?
Teamviewer? If you'd like to switch to business/private email: robertleeplummerjr at gmail or rplummer at visop-dev.com
On Wed, Jan 14, 2015 at 9:37 PM, Simon [email protected] wrote:
Sure how?
— Reply to this email directly or view it on GitHub https://github.com/jakiestfu/Medium.js/issues/130#issuecomment-70031385.
Robert Plummer
Skyped u an invite.
Linux didn't like it, switched to virtualbox, and it was over before it had begun.
On Wed, Jan 14, 2015 at 9:39 PM, Simon [email protected] wrote:
TM: m24-679-003
— Reply to this email directly or view it on GitHub https://github.com/jakiestfu/Medium.js/issues/130#issuecomment-70031529.
Robert Plummer
RobertLeePlummerJr, no notifications as of yet.
On Wed, Jan 14, 2015 at 9:44 PM, Simon [email protected] wrote:
Skyped u an invite.
— Reply to this email directly or view it on GitHub https://github.com/jakiestfu/Medium.js/issues/130#issuecomment-70031928.
Robert Plummer
DIdnt like teamviewer or skype?
I'm awaiting on skype.
On Wed, Jan 14, 2015 at 9:50 PM, Simon [email protected] wrote:
DIdnt like teamviewer or skype?
— Reply to this email directly or view it on GitHub https://github.com/jakiestfu/Medium.js/issues/130#issuecomment-70032319.
Robert Plummer
Ok - add me "SmartySimon" - NZ
https://www.youtube.com/watch?v=hmqyc1VVw4M
On Wed, Jan 14, 2015 at 9:50 PM, Robert Plummer < [email protected]> wrote:
I'm awaiting on skype.
On Wed, Jan 14, 2015 at 9:50 PM, Simon [email protected] wrote:
DIdnt like teamviewer or skype?
— Reply to this email directly or view it on GitHub https://github.com/jakiestfu/Medium.js/issues/130#issuecomment-70032319 .
Robert Plummer
Robert Plummer
Hi, I think I've the same issue. with the following init code everything is fine:
new Medium({
element: document.getElementById('editor'),
mode: Medium.partialMode,
placeholder: 'Your comment'
});
but if I try to use the maxLength option with the following init code:
new Medium({
element: document.getElementById('editor'),
mode: Medium.partialMode,
placeholder: 'Your comment',
maxLength:2000
});
I got the same error message:
Uncaught TypeError: Cannot read property 'innerText' of undefined medium.js:1725
Medium.Utilities.utils.text medium.js:1725
intercept.down medium.js:195
I installed Medium.js using bower install medium.js
and it seems to install an old version.
Same issue different code
$(function() {
$('*[data-update="patch"]').each(function(index, value) {
var $value = $(value);
$value.on('dblclick', function(){
new Medium({
element: value,
mode: M.inlineMode,
maxLength: 25,
placeholder: 'edit'
});
return false;
});
});
});
Basicaly i got a table i want the editable behavior when double clicking a cell
i got the Uncaught TypeError: Cannot read property 'innerText' of undefined
as soon as i change the value of the cell
Same here. Removing maxLength from the config, fixed the errors and also an issue where could still enter newlines while in inlineMode
by pressing enter twice, with weird cursor-jump in between (which reads a bit like #189).
Using Chrome 51 on Windows 7. My config:
// initialising editor. see http://jakiestfu.github.io/Medium.js/docs/
this.medium = new Medium({
element: this.textField().querySelector('.medium-mount'),
modifier: 'auto',
placeholder: this.placeholder,
autoHR: false, //if true, inserts <hr> after two empty lines
mode: Medium.inlineMode, // no newlines, no styling
//maxLength: this.maxChars,
tags: { },
attributes: {
remove: ['style', 'class']
},
});
this.medium.placeholder.style = ""; //remove the inline-styles placed by medium.js
Yep removing maxLength
fixes it. I tried using data-medium-maxLength
, but that seems to get set to data-medium-maxlength
when rendered from an underscore template (which I'm assuming causes Medium.js
to not pick up on it).