[title] add QuotaExceedError handling code to saving task part
[issue#] N_SE-56524
[problem] Task does not save when Emulator is full memory in TaskManager
[solve] add QuotaExceedError handling code to saving task part in JS file
Change-Id: Ie285b60adfc3cc7221294871c511ea86d30cf78f
var taskText = $("#txtTask").val();\r
var plainStr = htmlTagToPlain(taskText);\r
\r
var taskText = $("#txtTask").val();\r
var plainStr = htmlTagToPlain(taskText);\r
\r
- // Store localStorage data\r
- local.setItem(key, plainStr);\r
+ try {\r
+ // Store localStorage data\r
+ local.setItem(key, plainStr);\r
+ } catch (e) {\r
+ if (e.code === 22) {\r
+ alert("Not enough memory.");\r
+ }\r
+ }\r
location.reload();\r
}\r
}\r
location.reload();\r
}\r
}\r