Problems in scriptwriting

I have the newest ios 11 beta, and I’m using a smart keyboard cover. When I tried to use my iPad to continue to work on the screenplay I’m working on, I’m having lots of trouble with the elements. If I continue on my iPad from where I left off on my laptop, everything is fine until I try to go to the next element. It seems like all the presets get wonky and don’t do the right thing (like going from Character to scene heading when you hit enter). I can’t seem to get anything to act right. And no matter which element I select after that everything is capitalized. So I can’t write a character element, hit enter, change to dialogue and then type, because it is still all caps.

Any advice?

Without wishing to be flippant, my current advice is “Don’t use iOS 11 for real work yet.” I say this because there is a very serious bug that Apple has introduced to its text system in iOS 11 - it’s so enormous that I can’t believe it even made it through to a beta. The bug is this: after every letter you type, the iOS text system in iOS 11 tries to reset the current formatting for typing back to that of the first character in the text. This doesn’t just affect screenwriting - it affects everything. For instance, try this:

  1. In a new document with screenwriting turned off, type some text. Change the text at the start of the document so that it’s large, bold and red.
  2. Type another paragraph and remove the bold, red formatting and make it normal size. Now start typing at the end of that paragraph.

What happens is that as soon as you start typing at the end of the paragraph, the text reverts to being big, red and bold - it keeps grabbing the formatting from the start of the text.

Likewise, if you switch to using italics and try typing, only the first letter will be italicised; after that, typing reverts to the formatting at the start of the text.

When you use scriptwriting mode, what is happening is that with each letter you type, the formatting is getting reset back to the scene heading element from the start of the text - this is caused by Apple’s nasty bug. This bug is rendering the entire app very awkward to use on the current beta.

I have reported this bug to Apple as ID#34239348. Please make sure you report it to them, too, in the hope that more reports will make it more likely they fix it. You can tell them to reference this bug ID for a developer report.

I have spent the past two days finding a workaround for this bug and now have a workaround that works for the most part. However, the workaround is hideous, as it involves a lot of kludges and reworking text as it’s typed. For instance, it has to:

  • Cache the expected formatting before you type something and see if the text after typing matches the expected formatting, and if not, fix it up.
  • Not do this if you were pasting, though.
  • Fix up typing attributes every time you change the selection.
  • Not fix things up in certain situations (for instance when scriptwriting changes typing attributes to something else).
  • Use hacks to get around Apple’s auto-correction also triggering the bug.

So I have a horrible, horrible workaround ready to go, but I’ll only release a version containing it if Apple doesn’t fix the bug, because it’s a last resort. Unfortunately, Scrivener is the only app I can find that is affected by it so far, because very few apps use the rich text formatting features of UITextView like we do. Markdown editors use Markdown for the formatting and override formatting as you type, and Apple uses a custom text engine or web views for its own apps rather than use the text engine it provides developers.

I’m sorry I don’t have anything that get you up and running right now, but it’s a bit of a show-stopping bug.

I had a feeeling it had something to do with the beta. I’ll submit a report to Apple a well.

Thanks for the reply and all your work. Love to use it no matter where I am.

Great, thanks for the kind words and for reporting this to Apple - the more people who report it the better.

Actually, there is a workaround you can use in the meantime. The bug only affects typing at the end of the text. So what you can do is insert a return character at the end of the text and then put the cursor before that to type at the end of the text without problems. Then, when you’re done editing, delete the return character again. This will at least let you work before the bug is fixed, either by Apple or by my workaround.