Problem with focusing number inputs when in editor (Firefox)
see https://jsfiddle.net/cmx66/ct30oavg/
- edit
- increase number in number input
- editor crashes with exception
Error: Permission denied to access property "_uuid" - cursor behaves weird afterwards
@StephanHoyer Thanks for reporting. This looks like it may be related to an FF bug and/or over-zealous same-origin policy protections. Oddly, I am only to repro sporadically using your fiddle above.
Mobiledoc uses an element map to keep track of elements that it has rendered, and uses an expando uuid property to properly keep track of them. The error you see is when mobiledoc tries to set that property on one of the elements.
Do you see this behavior when your code is running without any iframes (and not via a file:// url)?
I'm not using any iframe.
For me this happens every the time.
- click the editor
- enter some things (chars occur as normal on the cursor)
- click the numberinput increase button
- click the editor again on another position
- enter some text (chars occur on the former position)
I can reliably replicate this issue as well, it's weird though - how is this any different to losing focus to anything else, we're not seeing this issue with toolbars for instance.
I just ran into this as well. Happens in jsfiddle every time for me as well (though I had to update the jsfiddle mobiledoc src link). It happens as soon as I click into the number input, no need to do anything first.
Backtrace:
get element-map.js:30
getElementRenderNode render-tree.js:28
findRenderNodeFromElement render-tree.js:54
isAddressable cursor.js:49
isElementAddressable event-manager.js:132
selectionDidChange event-manager.js:140
selectionDidChange self-hosted:988:17
selectionDidChange selection-manager.js:42
notifyListeners/< selection-change-observer.js:60
forEach self-hosted:268:13
notifyListeners selection-change-observer.js:59
update selection-change-observer.js:104
poll selection-change-observer.js:86
poll/< selection-change-observer.js:88
Looks to me like it's just mobiledoc checking to see if the node that has focus [number input] is one of its own, not actually trying to set _uuid.
It's something specific about the type='number' input. I tried a bunch of other input types and they're all fine. updated fiddle.
It does seem like it should be related to the input being in an iframe however I was able to repro without iframes & should be able to send a link to said repro tomorrow if you're interested