Fossil SCM

Code styling and comment tweaks.

mistachkin 2014-08-13 19:50 trunk
Commit a3cf0e3390e23fc3ed2f58b7b28bdb99da9d71da
1 file changed +9 -4
+9 -4
--- src/wysiwyg.c
+++ src/wysiwyg.c
@@ -252,16 +252,21 @@
252252
@
253253
@ /* Run the editing command if in WYSIWYG mode */
254254
@ function formatDoc(sCmd, sValue) {
255255
@ if (isWysiwyg()){
256256
@ try {
257
- @ // First try the draft standard W3C way, which works on non-IE
258
- @ // for a long time, and now finally supported in IE11+.
257
+ @ // First, try the W3C draft standard way, which has
258
+ @ // been working on all non-IE browsers for a while.
259
+ @ // It is also supported by IE11 and higher.
259260
@ document.execCommand("styleWithCSS", false, false);
260261
@ } catch (e) {
261
- @ try { document.execCommand("useCSS", 0, true); } // IE9/10
262
- @ catch (e) { } // old IE
262
+ @ try {
263
+ @ // For IE9 or IE10, this should work.
264
+ @ document.execCommand("useCSS", 0, true);
265
+ @ } catch (e) {
266
+ @ // Ok, that apparently did not work, do nothing.
267
+ @ }
263268
@ }
264269
@ document.execCommand(sCmd, false, sValue);
265270
@ oDoc.focus();
266271
@ }
267272
@ }
268273
--- src/wysiwyg.c
+++ src/wysiwyg.c
@@ -252,16 +252,21 @@
252 @
253 @ /* Run the editing command if in WYSIWYG mode */
254 @ function formatDoc(sCmd, sValue) {
255 @ if (isWysiwyg()){
256 @ try {
257 @ // First try the draft standard W3C way, which works on non-IE
258 @ // for a long time, and now finally supported in IE11+.
 
259 @ document.execCommand("styleWithCSS", false, false);
260 @ } catch (e) {
261 @ try { document.execCommand("useCSS", 0, true); } // IE9/10
262 @ catch (e) { } // old IE
 
 
 
 
263 @ }
264 @ document.execCommand(sCmd, false, sValue);
265 @ oDoc.focus();
266 @ }
267 @ }
268
--- src/wysiwyg.c
+++ src/wysiwyg.c
@@ -252,16 +252,21 @@
252 @
253 @ /* Run the editing command if in WYSIWYG mode */
254 @ function formatDoc(sCmd, sValue) {
255 @ if (isWysiwyg()){
256 @ try {
257 @ // First, try the W3C draft standard way, which has
258 @ // been working on all non-IE browsers for a while.
259 @ // It is also supported by IE11 and higher.
260 @ document.execCommand("styleWithCSS", false, false);
261 @ } catch (e) {
262 @ try {
263 @ // For IE9 or IE10, this should work.
264 @ document.execCommand("useCSS", 0, true);
265 @ } catch (e) {
266 @ // Ok, that apparently did not work, do nothing.
267 @ }
268 @ }
269 @ document.execCommand(sCmd, false, sValue);
270 @ oDoc.focus();
271 @ }
272 @ }
273

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button