Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with focusing number inputs when in editor (Firefox) #544

Open
StephanHoyer opened this issue Mar 20, 2017 · 4 comments
Open

Problem with focusing number inputs when in editor (Firefox) #544

StephanHoyer opened this issue Mar 20, 2017 · 4 comments

Comments

@StephanHoyer
Copy link

StephanHoyer commented Mar 20, 2017

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
@bantic
Copy link
Collaborator

bantic commented Mar 22, 2017

@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)?

@StephanHoyer
Copy link
Author

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)

@disordinary
Copy link
Collaborator

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.

@sdhull
Copy link

sdhull commented Sep 28, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants